@juspay/neurolink 13.4.1 → 13.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4002,53 +4002,37 @@
4002
4002
  {"objectID":"58496b05fc501a4521336522ee26a5eb64aa0e9d6b609b350cc0813f6d453feb","title":"Exports","url":"/docs/features/observability#exports","content":"| Removed | Replacement |\n| ----------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |\n| initializeOpenTelemetry | Automatic on new NeuroLink() |\n| getLangfuseSpanProcessor | createExporterSpanProcessor(registry) or new LangfuseSpanProcessor() |\n| getTracerProvider, getTracer | trace.getTracer() from @opentelemetry/api |\n| getSpanProcessors | Add createExporterSpanProcessor() to your provider |\n| createContextEnricher | setLangfuseContext or per-call context |\n| isUsingExternalTracerProvider | getLangfuseHealthStatus().usingExternalProvider |\n| isLangfuseInternalSpan, langfuseShouldExportSpan | Removed; only observation spans are exported |\n| getLangfuseContext | Removed |\n| runWithCurrentLangfuseContext | context.bind(context.active(), fn) from @opentelemetry/api |\n| buildObservabilityConfigFromEnv | Removed; env keys are read automatically |\n| createMockLangfuseClient","hierarchy":{"lvl0":"Features","lvl1":"Observability Guide","lvl2":"Exports","lvl3":""}},
4003
4003
  {"objectID":"ddf06146284ab7554c88bfef97f75c42c4186a270ac952f6cb27eb9e3640217a","title":"CLI","url":"/docs/features/observability#cli","content":"| Removed | Replacement |\n| ------------------------------------ | -------------------------------------- |\n| neurolink telemetry configure | Set LANGFUSE_* environment variables |\n| neurolink telemetry list-exporters | neurolink telemetry status |\n| neurolink observability exporters | neurolink observability status |\n\nExporterRegistry, NoOpExporter, AlwaysSampler, NeverSampler and the vendor exporter classes are unchanged. NeuroLink wires only LangfuseExporter. LangfuseExporter, ExporterSpanProcessor and createExporterSpanProcessor are new root exports.","hierarchy":{"lvl0":"Features","lvl1":"Observability Guide","lvl2":"CLI","lvl3":""}},
4004
4004
  {"objectID":"9a2c99612604332f4b2bc32fb673fe19412249aba74ad41f2ed2cfd84a8d1185","title":"See Also","url":"/docs/features/observability#see-also","content":"Telemetry Guide\nClaude Proxy Observability\nAnalytics Reference","hierarchy":{"lvl0":"Features","lvl1":"Observability Guide","lvl2":"See Also","lvl3":""}},
4005
- {"objectID":"1b22ff57a6c6e2525e50e02118d6029f5ee3779ef701e9fde1b7b97d1a782760","title":"Office Documents Support","url":"/docs/features/office-documents","content":"Office Documents Support\n\nNeuroLink provides seamless Office document support as a multimodal input type - attach DOCX, PPTX, and XLSX documents directly to your AI prompts for document analysis, data extraction, and content processing.\n\nOverview\n\nOffice document support in NeuroLink works as a native multimodal input - the system automatically processes Office files and passes them to the AI provider's document understanding capabilities. The system:\nValidates Office files using magic byte detection and format verification\nChecks provider compatibility (Bedrock, Vertex AI, Anthropic)\nVerifies file size limits per provider\nPasses documents directly to the provider's native document API\nWorks with providers that support native Office document processing\n\nKey Difference from PDF: Similar to PDF files, Office documents are sent as binary documents to providers with native document support. This enables analysis of formatted text, tables, charts, and embedded content within Office files.\n\nSupported File Types\n\n| Format | Extension | MIME Type | Description |\n| --------------------- | --------- | --------------------------------------------------------------------------- | -------------------------------------------------- |\n| Word Document | .docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document | Microsoft Word documents with text, images, tables |\n| PowerPoint | .pptx | application/vnd.openxmlformats-officedocument.presentationml.presentation | Presentations with slides, charts, images |\n| Excel Spreadsheet | .xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | Spreadsheets with data, formulas, charts |\n\nLegacy Formats:\n\n| Format | Extension | MIME Type | Support |\n| -------------- | --------- | -------------------------- | ------------------ |\n| Word (Legacy) | .doc | application/msword | Provider-dependent |\n| Excel (Legacy) | .xls | application/vnd.ms-excel | Provider-dependent |\n\nQuick Start\n\nSDK Usage\n\nCLI Usage\n\nAPI Reference\n\nGenerateOptions\n\nStreamOptions\n\nOfficeProcessorOptions\n\nOnly sheetName and formatStyle are read by the XLSX pipeline today; the\nother fields are declared but not yet consumed.\n\nDOCX structure and metrics\n\nA .docx is converted to Markdown before it reaches the model, so headings,\nordered and unordered lists, and tables survive as structure rather than being\nflattened into prose. Each document is prefixed with a metrics line:\n\nThis needs no configuration and applies to every provider, because the\nconversion happens while the prompt is built rather than in a provider adapter.\n\nSelecting and formatting spreadsheet data\n\nNaming a sheet that does not exist does not silently fall back to every sheet —\nthe prompt reports the miss and lists the available sheet names.\n\nFile Input Formats\n\nProvider Support\n\nSupported Providers\n\n| Provider | Max Size | DOCX | PPTX | XLSX | DOC | XLS | Notes |\n| -------------------- | -------- | ---- | ---- | ---- | --- | --- | ------------------------------------ |\n| AWS Bedrock | 5 MB | ✅ | ✅ | ✅ | ✅ | ✅ | Full native support via Converse API |\n| Google Vertex AI | 5 MB | ✅ | ⚠️ | ✅ | ⚠️ | ⚠️ | Best for DOCX and XLSX |\n| Anthropic Claude | 5 MB | ✅ | ⚠️ | ✅ | ⚠️ | ⚠️ | Via document API |\n\nUnsupported Providers\n\nThe following providers do not currently support native Office document processing:\nOpenAI (GPT-4o)\nGoogle AI Studio\nAzure OpenAI\nOllama (local models)\nLiteLLM\nMistral AI\nHugging Face\n\nError Message for Unsupported Providers:\n\nProvider-Specific Features\n\nAWS Bedrock (Recommended)\n\nBedrock offers the most comprehensive Office document support via the Converse API:\n\nSupported Document Formats in Bedrock Converse API:\nOffice formats: doc, docx, xls, xlsx\nOther formats: pdf, csv, html, txt, md\n\nGoogle Vertex AI\n\nAnthropic Claude\n\nFeatures\nAuto-Detection\n\nUse the files array for automatic file type detection:\nMultiple Document Types\n\nProcess multiple Office documents in a single request:\nMixed Multimodal Inputs\n\nCombine Office documents with other file types:\n\nType Definitions\n\nOfficeFileType\n\nOfficeProcessingResult\n\nOfficeProviderConfig\n\nError Handling\n\nError Types\n\nError Handling Patterns\n\nMetadata Fields\n\nWhen processing Office documents, the following metadata is available:\n\n| Field | Type | Description |\n| ------------------- | ---------------- | -------------------------------- |\n| confidence | number | Detection confidence (0-100) |\n| size | number | File size in bytes |\n| filename | string | Original filename |\n| format | OfficeFileT","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"","lvl3":""}},
4006
- {"objectID":"20c3155d2c1f39db07b8ffb72304d589cb601d27d43fb6f6f81ec8e83b5af4f2","title":"Office Documents Support","url":"/docs/features/office-documents#office-documents-support","content":"NeuroLink provides seamless Office document support as a multimodal input type - attach DOCX, PPTX, and XLSX documents directly to your AI prompts for document analysis, data extraction, and content processing.","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Office Documents Support","lvl3":""}},
4007
- {"objectID":"89922c3be7ba989417dd4f9aa76cf3c0497898b83d430c80f5809846a01ebcab","title":"Overview","url":"/docs/features/office-documents#overview","content":"Office document support in NeuroLink works as a native multimodal input - the system automatically processes Office files and passes them to the AI provider's document understanding capabilities. The system:\nValidates Office files using magic byte detection and format verification\nChecks provider compatibility (Bedrock, Vertex AI, Anthropic)\nVerifies file size limits per provider\nPasses documents directly to the provider's native document API\nWorks with providers that support native Office document processing\n\nKey Difference from PDF: Similar to PDF files, Office documents are sent as binary documents to providers with native document support. This enables analysis of formatted text, tables, charts, and embedded content within Office files.","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Overview","lvl3":""}},
4008
- {"objectID":"0b9f9e62a508886292fe189b77c320798552f0b7ac01939ef46d03f3b78126a3","title":"Supported File Types","url":"/docs/features/office-documents#supported-file-types","content":"| Format | Extension | MIME Type | Description |\n| --------------------- | --------- | --------------------------------------------------------------------------- | -------------------------------------------------- |\n| Word Document | .docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document | Microsoft Word documents with text, images, tables |\n| PowerPoint | .pptx | application/vnd.openxmlformats-officedocument.presentationml.presentation | Presentations with slides, charts, images |\n| Excel Spreadsheet | .xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | Spreadsheets with data, formulas, charts |\n\nLegacy Formats:\n\n| Format | Extension | MIME Type | Support |\n| -------------- | --------- | -------------------------- | ------------------ |\n| Word (Legacy) | .doc | application/msword | Provider-dependent |\n| Excel (Legacy) | .xls | application/vnd.ms-excel | Provider-dependent |","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Supported File Types","lvl3":""}},
4005
+ {"objectID":"1b22ff57a6c6e2525e50e02118d6029f5ee3779ef701e9fde1b7b97d1a782760","title":"Office Documents Support","url":"/docs/features/office-documents","content":"Office Documents Support\n\nNeuroLink reads Word, Excel, and PowerPoint files itself and puts their content into the prompt as text. Attach them through the same input.files array (or --file flag) that carries every other file type; there is no separate Office input field and no provider restriction.\n\nOverview\n\nWhen a request carries an Office file, NeuroLink:\nDetects the format from the file's bytes, MIME type, and extension.\nExtracts the content in-process: Word through mammoth (converted to Markdown), Excel through exceljs, and PowerPoint by reading the slide XML inside the .pptx package.\nAppends the extracted text to the prompt under a heading that names the file (## Document: \"report.docx\", ## Spreadsheet: \"sales.xlsx\", ## Presentation: \"deck.pptx\").\nSends an ordinary text prompt to whichever provider you chose.\n\nBecause the model receives text, Office files work with every provider and model, including ones with no document API (OpenAI, Ollama, Mistral, and so on). The model sees what the extractors can read: text, tables, and speaker notes. It does not see images, charts, or shapes that carry no text.\n\nSupported File Types\n\n| Format | Extension | MIME Type | What the model receives |\n| --------------------- | --------- | --------------------------------------------------------------------------- | ------------------------------------------------------- |\n| Word Document | .docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document | Markdown (headings, lists, tables) and a metrics line |\n| PowerPoint | .pptx | application/vnd.openxmlformats-officedocument.presentationml.presentation | Text of every slide, table rows, and each slide's notes |\n| Excel Spreadsheet | .xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | Every sheet (or one you name) in the format you choose |\n\nThe same three routes also carry OpenDocument text, spreadsheet and presentation files (.odt, .ods, .odp) and RTF (.rtf), which are read as plain text.\n\nLegacy binary formats (.doc, .xls, .ppt) are recognised but not parsed: the readers only understand the Office Open XML packages above. The request still succeeds, and the model receives a short note saying the file was attached but its content could not be extracted. Re-save such files as .docx, .xlsx, or .pptx first.\n\nQuick Start\n\nSDK Usage\n\nCLI Usage\n\nThe CLI has no flags for officeOptions; choosing a sheet or a spreadsheet format is an SDK feature (see below).\n\nWhat the Model Receives\n\nDOCX structure and metrics\n\nA .docx is converted to Markdown before it reaches the model, so headings, ordered and unordered lists, and tables survive as structure rather than being flattened into prose. Each document is prefixed with a metrics line:\n\nPPTX slides, tables, and speaker notes\n\nA .pptx is read slide by slide, in slide-number order. Each slide's text comes first, then its speaker notes on a **Speaker notes:** line:\nText boxes and titles come out one text run per line, with XML character references decoded (&amp; is shown as &, &lt; as <, &#169; as the copyright sign).\nA table row becomes one line with the cells joined by |. An empty cell keeps its separator, so the cells of a row can still be counted (Q3 | | has three, | Open | has three), and a cell with several paragraphs or line breaks is joined onto the one line with spaces. A row with no text at all is dropped. A literal | in cell text is not escaped, so it reads like a separator.\nSpeaker notes are always included. There is no option to turn them off.\nA slide with no text and no notes is left out. A deck of nothing but pictures therefore arrives as the Presentation: N slide(s) header alone.\nPictures, charts, SmartArt, and shapes that hold no text contribute nothing.\n\nSelecting and formatting spreadsheet data\n\nNaming a sheet that does not exist does not silently fall back to every sheet. The prompt reports the miss and lists the available sheet names.\n\nOptions\n\nofficeOptions is accepted by generate() and stream(). Two fields are read, both by the spreadsheet reader:\n\n| Option | Type | Default | Effect |\n| ------------- | ---------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| sheetName | string | all | Restrict the workbook to the named sheet. An unknown name is reported in the prompt together with the sheets that do exist. ","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"","lvl3":""}},
4006
+ {"objectID":"20c3155d2c1f39db07b8ffb72304d589cb601d27d43fb6f6f81ec8e83b5af4f2","title":"Office Documents Support","url":"/docs/features/office-documents#office-documents-support","content":"NeuroLink reads Word, Excel, and PowerPoint files itself and puts their content into the prompt as text. Attach them through the same input.files array (or --file flag) that carries every other file type; there is no separate Office input field and no provider restriction.","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Office Documents Support","lvl3":""}},
4007
+ {"objectID":"89922c3be7ba989417dd4f9aa76cf3c0497898b83d430c80f5809846a01ebcab","title":"Overview","url":"/docs/features/office-documents#overview","content":"When a request carries an Office file, NeuroLink:\nDetects the format from the file's bytes, MIME type, and extension.\nExtracts the content in-process: Word through mammoth (converted to Markdown), Excel through exceljs, and PowerPoint by reading the slide XML inside the .pptx package.\nAppends the extracted text to the prompt under a heading that names the file (## Document: \"report.docx\", ## Spreadsheet: \"sales.xlsx\", ## Presentation: \"deck.pptx\").\nSends an ordinary text prompt to whichever provider you chose.\n\nBecause the model receives text, Office files work with every provider and model, including ones with no document API (OpenAI, Ollama, Mistral, and so on). The model sees what the extractors can read: text, tables, and speaker notes. It does not see images, charts, or shapes that carry no text.","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Overview","lvl3":""}},
4008
+ {"objectID":"0b9f9e62a508886292fe189b77c320798552f0b7ac01939ef46d03f3b78126a3","title":"Supported File Types","url":"/docs/features/office-documents#supported-file-types","content":"| Format | Extension | MIME Type | What the model receives |\n| --------------------- | --------- | --------------------------------------------------------------------------- | ------------------------------------------------------- |\n| Word Document | .docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document | Markdown (headings, lists, tables) and a metrics line |\n| PowerPoint | .pptx | application/vnd.openxmlformats-officedocument.presentationml.presentation | Text of every slide, table rows, and each slide's notes |\n| Excel Spreadsheet | .xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | Every sheet (or one you name) in the format you choose |\n\nThe same three routes also carry OpenDocument text, spreadsheet and presentation files (.odt, .ods, .odp) and RTF (.rtf), which are read as plain text.\n\nLegacy binary formats (.doc, .xls, .ppt) are recognised but not parsed: the readers only understand the Office Open XML packages above. The request still succeeds, and the model receives a short note saying the file was attached but its content could not be extracted. Re-save such files as .docx, .xlsx, or .pptx first.","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Supported File Types","lvl3":""}},
4009
4009
  {"objectID":"5e3d4c5a982f07792f76fa44f8d72951142a507c235a348285207611716f4513","title":"CLI Usage","url":"/docs/features/office-documents#cli-usage","content":"`bash","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"CLI Usage","lvl3":""}},
4010
- {"objectID":"856b7a39248548ac58080c1e6cbd2072232fcd2f757f87132b3e6554acbde7c0","title":"Attach Office files to your prompt","url":"/docs/features/office-documents#attach-office-files-to-your-prompt","content":"neurolink generate \"Summarize this document\" --file report.docx --provider bedrock","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Attach Office files to your prompt","lvl3":""}},
4011
- {"objectID":"6079d9c5c77e616f8f43b33a02dda987ae095536f7c8e9272f186bb1532b0502","title":"Multiple Office files","url":"/docs/features/office-documents#multiple-office-files","content":"neurolink generate \"Compare these reports\" --file q1.docx --file q2.docx --provider bedrock","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Multiple Office files","lvl3":""}},
4012
- {"objectID":"a0d95ee40b05288bf39ee3919dd9721441a669284b337a3c938b41b5045a596e","title":"Excel spreadsheet analysis","url":"/docs/features/office-documents#excel-spreadsheet-analysis","content":"neurolink generate \"Analyze sales trends\" --file sales.xlsx --provider bedrock","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Excel spreadsheet analysis","lvl3":""}},
4013
- {"objectID":"486abb3f7ddd74e509b90381e71e55ac04e35efa5d4a4343120da060d3b94f7e","title":"PowerPoint presentation","url":"/docs/features/office-documents#powerpoint-presentation","content":"neurolink generate \"Extract key points from slides\" --file presentation.pptx --provider bedrock","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"PowerPoint presentation","lvl3":""}},
4014
- {"objectID":"f2a3292cd8b2c1e4fd2b00bc931836682736f6e8f99e379912f3d570c7791916","title":"Auto-detect file types","url":"/docs/features/office-documents#auto-detect-file-types","content":"neurolink generate \"Analyze all documents\" --file report.docx --file data.xlsx --provider bedrock","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Auto-detect file types","lvl3":""}},
4015
- {"objectID":"771290e410b0a74d826c5973de02a9a3064fa2b66543b83163fd06fc2be7b37d","title":"Stream mode with Office documents","url":"/docs/features/office-documents#stream-mode-with-office-documents","content":"neurolink stream \"Explain this document in detail\" --file document.docx --provider bedrock","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Stream mode with Office documents","lvl3":""}},
4016
- {"objectID":"52189df50a2aa3edc4c43df6d16b7390207ec0b8eaca625c0b90a45190f6f45c","title":"attachments are only available on generate and stream.","url":"/docs/features/office-documents#attachments-are-only-available-on-generate-and-stream","content":"`","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"attachments are only available on generate and stream.","lvl3":""}},
4017
- {"objectID":"beeb0b5e0c628bc0390e7579cc89c3dcb929894cffeb7a04bb8df96f6c8beb50","title":"OfficeProcessorOptions","url":"/docs/features/office-documents#officeprocessoroptions","content":"Only sheetName and formatStyle are read by the XLSX pipeline today; the\nother fields are declared but not yet consumed.","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"OfficeProcessorOptions","lvl3":""}},
4018
- {"objectID":"67803d753a4af41df778c73ea9d4f3055339e3e9c2eaa77b082e5b95d0b5bff3","title":"DOCX structure and metrics","url":"/docs/features/office-documents#docx-structure-and-metrics","content":"A .docx is converted to Markdown before it reaches the model, so headings,\nordered and unordered lists, and tables survive as structure rather than being\nflattened into prose. Each document is prefixed with a metrics line:\n\n`\nDocument: 42 words, 9 paragraphs, 268 characters","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"DOCX structure and metrics","lvl3":""}},
4019
- {"objectID":"e58480b8b9a182fd718393f62b8c0beaeb759f7d39ba9ca286a122ab959c66f1","title":"Adoption","url":"/docs/features/office-documents#adoption","content":"Merchant onboarding automated\nSettlement latency reduced\n\n| Region | Merchants | Volume |\n| --- | --- | --- |\n| APAC | 128 | 44200 |\n`\n\nThis needs no configuration and applies to every provider, because the\nconversion happens while the prompt is built rather than in a provider adapter.","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Adoption","lvl3":""}},
4020
- {"objectID":"4db4bf0a8dc60ff49e53fb0ea30ad888573cf4b2fc31a8664bd6fab88bb05235","title":"Selecting and formatting spreadsheet data","url":"/docs/features/office-documents#selecting-and-formatting-spreadsheet-data","content":"Naming a sheet that does not exist does not silently fall back to every sheet —\nthe prompt reports the miss and lists the available sheet names.","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Selecting and formatting spreadsheet data","lvl3":""}},
4021
- {"objectID":"12b894726ee0b402bad0c3fd17ca5de929c1c2402385ae027effd650cc104429","title":"Supported Providers","url":"/docs/features/office-documents#supported-providers","content":"| Provider | Max Size | DOCX | PPTX | XLSX | DOC | XLS | Notes |\n| -------------------- | -------- | ---- | ---- | ---- | --- | --- | ------------------------------------ |\n| AWS Bedrock | 5 MB | ✅ | ✅ | ✅ | ✅ | ✅ | Full native support via Converse API |\n| Google Vertex AI | 5 MB | ✅ | ⚠️ | ✅ | ⚠️ | ⚠️ | Best for DOCX and XLSX |\n| Anthropic Claude | 5 MB | ✅ | ⚠️ | ✅ | ⚠️ | ⚠️ | Via document API |","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Supported Providers","lvl3":""}},
4022
- {"objectID":"05fac2c6f487c6f16a0adbb2535b4675b18732ba064cf3febdcc1539df29e9d8","title":"Unsupported Providers","url":"/docs/features/office-documents#unsupported-providers","content":"The following providers do not currently support native Office document processing:\nOpenAI (GPT-4o)\nGoogle AI Studio\nAzure OpenAI\nOllama (local models)\nLiteLLM\nMistral AI\nHugging Face\n\nError Message for Unsupported Providers:","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Unsupported Providers","lvl3":""}},
4023
- {"objectID":"abafed9b3d4d95d62c55f7c337d36384f6ae83e392f8c5640e412a4478ca8d3f","title":"AWS Bedrock (Recommended)","url":"/docs/features/office-documents#aws-bedrock-recommended","content":"Bedrock offers the most comprehensive Office document support via the Converse API:\n\nSupported Document Formats in Bedrock Converse API:\nOffice formats: doc, docx, xls, xlsx\nOther formats: pdf, csv, html, txt, md","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"AWS Bedrock (Recommended)","lvl3":""}},
4024
- {"objectID":"9ef8aa415ec61bde939fcd6c270e8cb30fbcd7b0a3b102bc54587917903f6e1d","title":"1. Auto-Detection","url":"/docs/features/office-documents#1-auto-detection","content":"Use the files array for automatic file type detection:","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"1. Auto-Detection","lvl3":""}},
4025
- {"objectID":"5a8fc65f01a1e3ab244ef391da8cb22e5a175545a6d0c104d693f60cb3c4d553","title":"2. Multiple Document Types","url":"/docs/features/office-documents#2-multiple-document-types","content":"Process multiple Office documents in a single request:","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"2. Multiple Document Types","lvl3":""}},
4026
- {"objectID":"b501c9ca2864d31e8fe4ada86eb87fb54ef800ce182f3ba7b76b093c25caa9d5","title":"3. Mixed Multimodal Inputs","url":"/docs/features/office-documents#3-mixed-multimodal-inputs","content":"Combine Office documents with other file types:","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"3. Mixed Multimodal Inputs","lvl3":""}},
4027
- {"objectID":"416a000f4de346250b8beb41131ccdd481fd58a58ba45fca7ac299898d6162d8","title":"Metadata Fields","url":"/docs/features/office-documents#metadata-fields","content":"When processing Office documents, the following metadata is available:\n\n| Field | Type | Description |\n| ------------------- | ---------------- | -------------------------------- |\n| confidence | number | Detection confidence (0-100) |\n| size | number | File size in bytes |\n| filename | string | Original filename |\n| format | OfficeFileType | Detected Office format |\n| provider | string | Provider used for processing |\n| estimatedPages | number | Estimated page/slide/sheet count |\n| hasEmbeddedImages | boolean | Whether document contains images |\n| hasCharts | boolean | Whether document contains charts |","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Metadata Fields","lvl3":""}},
4028
- {"objectID":"238991d9e5f7515b6a807def3f1d68a6a459f1dcd7779b12161f673a2d59ed46","title":"File Format Requirements","url":"/docs/features/office-documents#file-format-requirements","content":"Must be valid Office Open XML format (.docx, .pptx, .xlsx)\nMust be within provider size limits (typically 5MB)\nMust not be password-protected or encrypted\nLegacy formats (.doc, .xls, .ppt) have limited support","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"File Format Requirements","lvl3":""}},
4029
- {"objectID":"2822c428274c1e0eb73f611da9e6e894dd57125e092dccd00ccf84aa7f53dca0","title":"Provider Limitations","url":"/docs/features/office-documents#provider-limitations","content":"| Limitation | Description | Workaround |\n| ------------------- | --------------------------- | --------------------------------------- |\n| Size limits | Most providers limit to 5MB | Split large documents or convert to PDF |\n| Password protection | Not supported | Remove password before processing |\n| Macros | VBA macros are ignored | N/A - security feature |\n| External links | May not be resolved | Embed content instead |\n| Complex formatting | Some formatting may be lost | Focus on content extraction |","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Provider Limitations","lvl3":""}},
4030
- {"objectID":"08a15c35e6938824658719e8062892d71ccb573f138400eddd818dfde27dde1a","title":"Token Usage","url":"/docs/features/office-documents#token-usage","content":"Office documents consume significant tokens. The following are approximate estimates that may vary by provider and content complexity:\nSimple DOCX: ~500-1,000 tokens per page\nComplex DOCX (with images/tables): ~1,500-3,000 tokens per page\nXLSX: ~100-500 tokens per sheet (depends on data density)\nPPTX: ~200-1,000 tokens per slide\n\nNote: Token estimates are based on typical document content. Actual usage may vary depending on document complexity, provider implementation, and model-specific tokenization.\n\nTip: Set appropriate maxTokens for Office document analysis:","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Token Usage","lvl3":""}},
4031
- {"objectID":"61080d046873acb5609d44b92f4a2200a9d2568ae2da3afe60c2c461947a3c6e","title":"Error: \"Office files are not currently supported\"","url":"/docs/features/office-documents#error-office-files-are-not-currently-supported","content":"Problem: Using unsupported provider (OpenAI, Ollama, etc.)\n\nSolution:\n\n`bash","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Error: \"Office files are not currently supported\"","lvl3":""}},
4032
- {"objectID":"e00c5f09fc1506085e18927755b8cff6e0dd8db1be7fb9a20d3afa560a58c030","title":"Change provider to supported one","url":"/docs/features/office-documents#change-provider-to-supported-one","content":"neurolink generate \"Analyze document\" --file doc.docx --provider bedrock","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Change provider to supported one","lvl3":""}},
4033
- {"objectID":"a1c751a0eff160215c059433a9113b8b5aa43d5178ba35b3c4f1c9efcc60d379","title":"Or use auto-detection with correct provider","url":"/docs/features/office-documents#or-use-auto-detection-with-correct-provider","content":"neurolink generate \"Analyze document\" --file doc.docx --provider vertex\n`","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Or use auto-detection with correct provider","lvl3":""}},
4034
- {"objectID":"d5d387cd93c20d62decb6008d1b3f2c5a942ba257d97074e154d6499b4ce99ae","title":"Error: \"File size exceeds limit\"","url":"/docs/features/office-documents#error-file-size-exceeds-limit","content":"Problem: File too large for provider (>5MB for most providers)\n\nSolution:\n\n`bash","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Error: \"File size exceeds limit\"","lvl3":""}},
4035
- {"objectID":"d293811755b6feb589f03663f1a023fadf0274b763f4288fb5674ab198d68b2a","title":"Option 3: Extract key sections manually","url":"/docs/features/office-documents#option-3-extract-key-sections-manually","content":"`","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Option 3: Extract key sections manually","lvl3":""}},
4036
- {"objectID":"b9d074cb991716964eee01f1a8f4842d93a47a8ee48c916ab17b3c17af6ea3bc","title":"Error: \"Invalid Office file format\"","url":"/docs/features/office-documents#error-invalid-office-file-format","content":"Problem: File is not a valid Office Open XML format or corrupted\n\nSolution:\n\n`bash","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Error: \"Invalid Office file format\"","lvl3":""}},
4037
- {"objectID":"a1cdbcc75fe5227c8eeefb4a84e4dc7d621e4b8b5cd74a54239070133d6e8aab","title":"Verify file is valid Office format","url":"/docs/features/office-documents#verify-file-is-valid-office-format","content":"file document.docx # Should show \"Microsoft Word 2007+\"","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Verify file is valid Office format","lvl3":""}},
4038
- {"objectID":"51f411c246e91b8e10be8eb88b64f0dff2d4333fd5e9369b879ccca57c03d230","title":"Ensure file is not password-protected","url":"/docs/features/office-documents#ensure-file-is-not-password-protected","content":"`","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Ensure file is not password-protected","lvl3":""}},
4039
- {"objectID":"78f8341d8946631d02d464807dd3e246e8681eb3e0db45e9574605ad8a6c4d6e","title":"Error: \"Provider not specified\"","url":"/docs/features/office-documents#error-provider-not-specified","content":"Problem: No provider selected (Office files require explicit provider)\n\nSolution:","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Error: \"Provider not specified\"","lvl3":""}},
4040
- {"objectID":"cca34450fc5c9fcd710431fe02c9ec97f4aa3efa952e1ce6f4b0e9e0e286a731","title":"Office Content Not Being Analyzed","url":"/docs/features/office-documents#office-content-not-being-analyzed","content":"Problem: AI says \"I cannot read the document\" even though file is attached\n\nCommon Causes:\nWrong provider: Make sure using supported provider\nFile path wrong: Verify file exists at specified path\nBuffer issue: If using Buffer, ensure it's valid Office data\nFormat mismatch: Ensure file extension matches actual format\n\nDebug:","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Office Content Not Being Analyzed","lvl3":""}},
4041
- {"objectID":"723205524a0a4c87bd8bfbc916f2df583236fd12ab36361a9b208f0b9239aea3","title":"Migrating from Manual Document Processing","url":"/docs/features/office-documents#migrating-from-manual-document-processing","content":"If you were previously using manual document extraction:\n\nBefore (Manual Processing):\n\nAfter (Native Support):","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Migrating from Manual Document Processing","lvl3":""}},
4042
- {"objectID":"0fede6938652242e8a41085e1343cc287e11ab2d2fea98631002ae223e405b96","title":"Migrating from PDF-First Workflow","url":"/docs/features/office-documents#migrating-from-pdf-first-workflow","content":"If you were converting Office files to PDF first:\n\nBefore (PDF Conversion):\n\nAfter (Direct Office Support):","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Migrating from PDF-First Workflow","lvl3":""}},
4043
- {"objectID":"91d3938652596fa8946e635c3609eb09c64a6d17f49ba685e49c34294bef0146","title":"API Changes Summary","url":"/docs/features/office-documents#api-changes-summary","content":"| Previous API | New API | Notes |\n| -------------------------- | --------------------------- | -------------------------------- |\n| Manual text extraction | officeFiles: [...] | Native document support |\n| PDF conversion workflow | Direct Office support | No conversion needed |\n| Provider-specific handling | Unified officeFiles array | Works across supported providers |\n| Custom MIME type handling | Auto-detection | Format automatically detected |","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"API Changes Summary","lvl3":""}},
4044
- {"objectID":"717a0b6810d80ff76d06f6b48a79823c511877b17942a590a2fd75cad0426b8f","title":"Usage Examples","url":"/docs/features/office-documents#usage-examples","content":"Here are complete working examples for common use cases:","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Usage Examples","lvl3":""}},
4010
+ {"objectID":"ba6ba101e9dd3f0aaf1d7fc20eaa9c09e103f657a86aae7186bf742e86ad6ac2","title":"Attach an Office file","url":"/docs/features/office-documents#attach-an-office-file","content":"neurolink generate \"Summarize this document\" --file report.docx --provider openai","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Attach an Office file","lvl3":""}},
4011
+ {"objectID":"52c6656502f8173700c43a888505652d631a45b2fc92c33064a87c502d5d9808","title":"Several files","url":"/docs/features/office-documents#several-files","content":"neurolink generate \"Compare these reports\" --file q1.docx --file q2.docx --provider openai","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Several files","lvl3":""}},
4012
+ {"objectID":"ed6e509cdca86d6db5b7fdb044f8b8e9f76a4c1b3703434b6c6273784e991370","title":"Spreadsheet","url":"/docs/features/office-documents#spreadsheet","content":"neurolink generate \"Analyze sales trends\" --file sales.xlsx --provider openai","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Spreadsheet","lvl3":""}},
4013
+ {"objectID":"b73c70ff6a6ce3c6b2344ff89ab95bac259dcaa055691cc7dd4c9ed586b7b472","title":"Presentation","url":"/docs/features/office-documents#presentation","content":"neurolink generate \"Extract key points from the slides\" --file presentation.pptx --provider openai","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Presentation","lvl3":""}},
4014
+ {"objectID":"2f088f9b29bfc06279c162e574c9f5efd5b0abeb1a88ef1400ca6ff0c24b692a","title":"Mixed file types","url":"/docs/features/office-documents#mixed-file-types","content":"neurolink generate \"Analyze all documents\" --file report.docx --file data.xlsx --provider openai","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Mixed file types","lvl3":""}},
4015
+ {"objectID":"eb0435da453683af2290c5fe2c918d5ae760e5c28b07ac5eb848029f3ecca4cd","title":"Stream mode","url":"/docs/features/office-documents#stream-mode","content":"neurolink stream \"Explain this document in detail\" --file document.docx --provider openai","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Stream mode","lvl3":""}},
4016
+ {"objectID":"52189df50a2aa3edc4c43df6d16b7390207ec0b8eaca625c0b90a45190f6f45c","title":"attachments are only available on generate and stream.","url":"/docs/features/office-documents#attachments-are-only-available-on-generate-and-stream","content":"The CLI has no flags for officeOptions`; choosing a sheet or a spreadsheet format is an SDK feature (see below).","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"attachments are only available on generate and stream.","lvl3":""}},
4017
+ {"objectID":"67803d753a4af41df778c73ea9d4f3055339e3e9c2eaa77b082e5b95d0b5bff3","title":"DOCX structure and metrics","url":"/docs/features/office-documents#docx-structure-and-metrics","content":"A .docx is converted to Markdown before it reaches the model, so headings, ordered and unordered lists, and tables survive as structure rather than being flattened into prose. Each document is prefixed with a metrics line:\n\n`\nDocument: 42 words, 9 paragraphs, 268 characters","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"DOCX structure and metrics","lvl3":""}},
4018
+ {"objectID":"e58480b8b9a182fd718393f62b8c0beaeb759f7d39ba9ca286a122ab959c66f1","title":"Adoption","url":"/docs/features/office-documents#adoption","content":"Merchant onboarding automated\nSettlement latency reduced\n\n| Region | Merchants | Volume |\n| --- | --- | --- |\n| APAC | 128 | 44200 |\n`","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Adoption","lvl3":""}},
4019
+ {"objectID":"cf894f1a0170e1d9ae191993fb7f476a559172b1ade2f2f87f2e6bb0e532e40c","title":"PPTX slides, tables, and speaker notes","url":"/docs/features/office-documents#pptx-slides-tables-and-speaker-notes","content":"A .pptx is read slide by slide, in slide-number order. Each slide's text comes first, then its speaker notes on a **Speaker notes:** line:\n\n`\nPresentation: 2 slide(s)","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"PPTX slides, tables, and speaker notes","lvl3":""}},
4020
+ {"objectID":"3641c8deffb2e9052d407692ff6dedc74edf1d8e089e33a72deeb947a69846c1","title":"Slide 1","url":"/docs/features/office-documents#slide-1","content":"Q3 Revenue & Growth\nRegion | Owner | Volume\nAPAC | Priya & Sam | 44200\nEMEA | | Line one Line two\nSpeaker notes: Mention the RTO improvement & Q3 .","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Slide 1","lvl3":""}},
4021
+ {"objectID":"a348366df70c960b3b21fe02ef13a609e14670723365bc7c770b2dce3cf12256","title":"Slide 2","url":"/docs/features/office-documents#slide-2","content":"Hire two analysts\nSpeaker notes: Ask finance about headcount.\n\n\n- Text boxes and titles come out one text run per line, with XML character references decoded (&amp; is shown as &, &lt; as <, &#169; as the copyright sign).\n- A table row becomes one line with the cells joined by |. An empty cell keeps its separator, so the cells of a row can still be counted (Q3 | | has three, | Open | has three), and a cell with several paragraphs or line breaks is joined onto the one line with spaces. A row with no text at all is dropped. A literal | in cell text is not escaped, so it reads like a separator.\n- Speaker notes are always included. There is no option to turn them off.\n- A slide with no text and no notes is left out. A deck of nothing but pictures therefore arrives as the Presentation: N slide(s)` header alone.\nPictures, charts, SmartArt, and shapes that hold no text contribute nothing.","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Slide 2","lvl3":""}},
4022
+ {"objectID":"4db4bf0a8dc60ff49e53fb0ea30ad888573cf4b2fc31a8664bd6fab88bb05235","title":"Selecting and formatting spreadsheet data","url":"/docs/features/office-documents#selecting-and-formatting-spreadsheet-data","content":"Naming a sheet that does not exist does not silently fall back to every sheet. The prompt reports the miss and lists the available sheet names.","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Selecting and formatting spreadsheet data","lvl3":""}},
4023
+ {"objectID":"c6e4cb72d1750712dfefdf5c733f161ce7b1f4815c0372df02c90228d34ab222","title":"Options","url":"/docs/features/office-documents#options","content":"officeOptions is accepted by generate() and stream(). Two fields are read, both by the spreadsheet reader:\n\n| Option | Type | Default | Effect |\n| ------------- | ---------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| sheetName | string | all | Restrict the workbook to the named sheet. An unknown name is reported in the prompt together with the sheets that do exist. |\n| formatStyle | \"raw\" \\| \"csv\" \\| \"markdown\" \\| \"json\" | \"raw\" | How each sheet is rendered: tab-separated preview (raw), comma-separated values with RFC 4180 quoting (csv), a markdown table (markdown), or an array of row objects keyed by the header row (json). |\n\nThe exported OfficeProcessorOptions type also declares format, extractTextOnly, maxSizeMB, includeMetadata, processAllSheets, and includeSlideNotes. Nothing reads them today, so setting them has no effect. The DOCX and PPTX readers take no options.","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Options","lvl3":""}},
4024
+ {"objectID":"2c878f33050150a1c335fc565c8ac53baa616e415b9688bcc65509f00a30acf5","title":"File input formats","url":"/docs/features/office-documents#file-input-formats","content":"Office files can sit in input.files next to PDFs, images, CSV, audio, and code. Office documents have no field of their own: there are no docxFiles, pptxFiles, xlsxFiles, or officeFiles inputs, so always use input.files.","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"File input formats","lvl3":""}},
4025
+ {"objectID":"39bb9ae046199f6b57dcbdd3043b7f5283038656ea6eff6ce0fb288fc813f98b","title":"Large Files","url":"/docs/features/office-documents#large-files","content":"An Office file in input.files (or --file) is always extracted and inlined in full, whatever its size. There is no on-demand mode for it through generate(), stream() or the CLI, so a very large workbook or deck is bounded by the limits under Limitations and by the model's context window.\n\nAn SDK caller that wants selective reads can use FileReferenceRegistry (exported from @juspay/neurolink/files) directly, which is a separate path from input.files. Its extractContent call returns only the slides in pages for a presentation (with the same text and speaker notes as above, and (No text content on this slide) for a slide that has neither), or the sheet, row_range and columns you name for a spreadsheet.","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Large Files","lvl3":""}},
4026
+ {"objectID":"b8748c4f0af34f715fdddc059eb7bfa9f5dd3ea85bf494e06536ff65a971626b","title":"Error Handling","url":"/docs/features/office-documents#error-handling","content":"Extraction problems do not throw. If an Office file is corrupt, password-protected, a legacy binary format, or simply empty, the prompt carries a note in place of its content and the request goes on:\n\nA file that cannot be loaded at all does fail the request. A missing path, for example, surfaces as:\n\nThere are no Office-specific error classes.","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Error Handling","lvl3":""}},
4027
+ {"objectID":"d9cfd3f9fad66e6791bed04b5037bbe30644d82e3899a0b0f60df23a19fcef12","title":"1. Narrow spreadsheets before sending them","url":"/docs/features/office-documents#1-narrow-spreadsheets-before-sending-them","content":"Every sheet is rendered into the prompt by default. For a large workbook, name the sheet you need and pick the format the model handles best:","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"1. Narrow spreadsheets before sending them","lvl3":""}},
4028
+ {"objectID":"118807d055d2114840307a78c7d89732d9d976151d235c75a3f52a7e6351a85a","title":"Limitations","url":"/docs/features/office-documents#limitations","content":"Open XML only. .docx, .xlsx, and .pptx are parsed. Legacy .doc, .xls, and .ppt are not (see above).\nText, tables, and notes only. Embedded images and charts are not sent to the model (a Word image shows up as an ![alt](/docs/embedded-image) marker), and VBA macros are never run.\nNo encrypted files. A password-protected file cannot be read and arrives as a placeholder note.\nSize bounds. Word and Excel files are bounded at 100 MB each, and a presentation's extracted content at 100 MB in total (the limits live in src/lib/processors/config/sizeLimits.ts). Files over the 200 MB general ceiling are refused when loaded.\nPrompt size. The extracted text counts against the model's context window. A big workbook or a long document can fill it; use sheetName, a leaner formatStyle, or a model with a larger window.","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Limitations","lvl3":""}},
4029
+ {"objectID":"80b48dc351da3300dd4ae708a7efc61f5f9acbf7f68e74e44c69870818bdd561","title":"The model says it cannot read the document","url":"/docs/features/office-documents#the-model-says-it-cannot-read-the-document","content":"Look for the Could not extract content note in the prompt. Typical causes:\nLegacy format: a .doc, .xls, or .ppt. Re-save it as .docx, .xlsx, or .pptx.\nCorrupt or truncated file: confirm it opens in Office. An Office Open XML file is a ZIP and starts with the bytes PK\\x03\\x04.\nPassword protection: remove the password before attaching.\nNo text in the file: a deck of pictures or a scanned document has nothing to extract, and a picture-only deck arrives as just the Presentation: N slide(s) header with no placeholder note. Convert scans to text with OCR first, or attach the images instead.","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"The model says it cannot read the document","lvl3":""}},
4030
+ {"objectID":"198d459661b8a685d7fb14d8055beaf3a54d861be0aa2a693f56466a93dad944","title":"A sheet is missing from the output","url":"/docs/features/office-documents#a-sheet-is-missing-from-the-output","content":"If you passed sheetName, the name must match exactly. When it does not, the prompt says so and lists the sheet names the workbook has.","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"A sheet is missing from the output","lvl3":""}},
4031
+ {"objectID":"501457e12f05fff01c8991f41dc2d1cea3faf87deb0ae8cf25a7a493c1ed24e8","title":"A request fails with Failed to process file","url":"/docs/features/office-documents#a-request-fails-with-failed-to-process-file","content":"The path or URL could not be loaded. Check that the file exists and that the process can read it.","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"A request fails with Failed to process file","lvl3":""}},
4032
+ {"objectID":"5e7fb0b35d33905448d83f51be5f6e64a657a27d50f6f3adf39df2131b4c6b78","title":"Migrating from Manual Extraction","url":"/docs/features/office-documents#migrating-from-manual-extraction","content":"If you extracted text yourself before sending it to the model:","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Migrating from Manual Extraction","lvl3":""}},
4045
4033
  {"objectID":"3c03775b5336ca35d9a4ffcc088c74550acc1fe040bab1111a5a42543593f0b1","title":"Related Features","url":"/docs/features/office-documents#related-features","content":"Multimodal Chat - Overview of multimodal capabilities\nPDF Support - PDF document processing\nCSV Support - CSV file processing","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Related Features","lvl3":""}},
4046
- {"objectID":"fbaf2f1f9a5b9c45e6c733fc6aca52c1c5fefd70b001825bf3177854c792f84b","title":"Implementation Files","url":"/docs/features/office-documents#implementation-files","content":"src/lib/processors/document/ - Office document validation and processing: WordProcessor, ExcelProcessor, PptxProcessor, RtfProcessor, OpenDocumentProcessor\nsrc/lib/utils/fileDetector.ts - File type detection (includes Office formats)\nsrc/lib/utils/messageBuilder.ts - Multimodal message construction\nsrc/lib/types/file.ts - Office type definitions\nsrc/cli/factories/commandFactory.ts - CLI --file flag handling","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Implementation Files","lvl3":""}},
4047
- {"objectID":"ba9f9862d5c22f61cda351e45c824647bb247859975a5b1fbf0b4d2f974bb90f","title":"Processing Speed","url":"/docs/features/office-documents#processing-speed","content":"Small DOCX (\\5MB): ~5-15 seconds\nComplex PPTX: ~5-20 seconds (depends on slide count)\nData-heavy XLSX: ~3-10 seconds","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Processing Speed","lvl3":""}},
4048
- {"objectID":"4d80bf1c1f7f6e958c718ca839b4eeee9d07b9051894b14b4b5571ccb79dfe8c","title":"Memory Usage","url":"/docs/features/office-documents#memory-usage","content":"Office files loaded as Buffers in memory\nLarge files may impact performance\nConsider processing large files in batches","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Memory Usage","lvl3":""}},
4049
- {"objectID":"0893e21f1445185c5040fba620e54b1a7a049b92af5c328fb683bc3228112629","title":"Future Enhancements","url":"/docs/features/office-documents#future-enhancements","content":"Planned features for Office document support:\nOpenAI Support: Document-to-text conversion for GPT models\nAzure OpenAI: Native document support when available\nPage Selection: Analyze specific pages/slides/sheets only\nContent Extraction: Extract specific elements (tables, charts)\nTemplate Processing: Fill document templates with AI-generated content\nLegacy Format Support: Improved .doc, .xls, .ppt support","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Future Enhancements","lvl3":""}},
4050
- {"objectID":"014e6c359962a668131d4519b39574e089edc3c0e6cbf723133d0643988f458a","title":"Feedback and Support","url":"/docs/features/office-documents#feedback-and-support","content":"Found a bug or have a feature request? Please:\nCheck existing issues on GitHub\nCreate a new issue with:\nProvider used\nOffice file details (format, size)\nError message or unexpected behavior\nSample code (if possible)","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Feedback and Support","lvl3":""}},
4051
- {"objectID":"1fb344158b3e63c2ee68c030af4e06fa6eac4dab3a9249d043b68c216de1491a","title":"Version 8.3.0+","url":"/docs/features/office-documents#version-830","content":"✅ Initial Office document support for DOCX, PPTX, XLSX\n✅ AWS Bedrock native support via Converse API\n✅ Google Vertex AI support\n✅ Anthropic Claude support\n✅ Auto-detection via --file flag\n✅ Multiple document processing\n✅ Size limit validation\n✅ Comprehensive error messages\n✅ CLI and SDK integration\n✅ Streaming support\n✅ Mixed multimodal inputs (Office + PDF + CSV + images)\n\nNext: Multimodal Chat Guide | PDF Support | CSV Support","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Version 8.3.0+","lvl3":""}},
4034
+ {"objectID":"43d29a8740a9b75d0c8953329e35d05feb905b0e855683fbfc121992f415dbcb","title":"Office Document Processing Flow","url":"/docs/features/office-documents#office-document-processing-flow","content":"An extraction failure at step 3 produces the placeholder note shown under Error Handling instead of content.","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Office Document Processing Flow","lvl3":""}},
4035
+ {"objectID":"fbaf2f1f9a5b9c45e6c733fc6aca52c1c5fefd70b001825bf3177854c792f84b","title":"Implementation Files","url":"/docs/features/office-documents#implementation-files","content":"src/lib/processors/document/ - WordProcessor, ExcelProcessor, PptxProcessor, RtfProcessor, OpenDocumentProcessor\nsrc/lib/utils/fileDetector.ts - Format detection and routing of Office files to their readers\nsrc/lib/utils/messageBuilder.ts - Appends extracted text to the prompt\nsrc/lib/types/file.ts - OfficeProcessorOptions\nsrc/lib/files/fileReferenceRegistry.ts - Targeted slide, sheet, and row reads for files held in a FileReferenceRegistry (SDK only; not reached through input.files)\nsrc/cli/factories/commandFactory.ts - CLI --file flag handling\n\nNext: Multimodal Chat Guide | PDF Support | CSV Support","hierarchy":{"lvl0":"Features","lvl1":"Office Documents Support","lvl2":"Implementation Files","lvl3":""}},
4052
4036
  {"objectID":"e4de9762f0dc156f476e41a2d0b060b933fd636614f6366ee0aeb002af7de1f4","title":"OpenCode Support for NeuroLink Proxy","url":"/docs/features/opencode-proxy-support","content":"OpenCode Support for NeuroLink Proxy\n\nStatus: Implemented & Verified\n\nThis document was originally written as a design proposal. Every item it called out as missing or to-be-built has since been implemented and verified end-to-end (see §11). The \"what was built\" wording in §4 and §8 reflects the delivered state; future-tense language has been kept only where it explains historical context.\nOverview\n\nNeuroLink's proxy currently supports Claude Code as a client — when neurolink proxy start runs, it automatically configures Claude Code by writing ANTHROPIC_BASE_URL to ~/.claude/settings.json. Claude Code then sends Anthropic Messages API requests to the proxy, which routes them to any provider.\n\nThis document describes adding OpenCode as a second supported client with the same zero-config experience: neurolink proxy start should auto-configure OpenCode so it connects to the proxy with no manual setup.\n\nWhat is OpenCode?\n\nOpenCode (github.com/sst/opencode) is an open-source AI coding agent built by the SST team. It is a TypeScript monorepo that shares the same technology stack as NeuroLink:\nVercel AI SDK (ai package) with streamText(), Tool types, ModelMessage\nProvider SDKs: @ai-sdk/openai, @ai-sdk/anthropic, @ai-sdk/openai-compatible, @ai-sdk/google, @ai-sdk/amazon-bedrock, @ai-sdk/azure, @ai-sdk/xai, @ai-sdk/mistral, @ai-sdk/groq, @openrouter/ai-sdk-provider, and more\nMCP: @modelcontextprotocol/sdk for tool integration\nZod: for tool parameter schemas\n\nOpenCode is provider-agnostic. It supports Claude, OpenAI, Google, Bedrock, Groq, Azure, xAI, Mistral, Cohere, and any OpenAI-compatible endpoint via @ai-sdk/openai-compatible.\nHow Claude Code Auto-Configuration Works Today\n\nWhen neurolink proxy start runs:\nServer starts on configured port (default 4141)\nAccounts are loaded from proxy config + OAuth credentials\nClaude Code settings are auto-configured:\nWrites to ~/.claude/settings.json\nSets env.ANTHROPIC_BASE_URL = \"http://localhost:<port>\"\nSets env.ENABLE_TOOL_SEARCH = \"true\"\nPreserves original values in __proxy_original_env for restoration\nOn proxy stop: restores original Claude Code settings\n\nKey code (src/cli/commands/proxy.ts):\n\nClaude Code then sends all requests to the proxy's /v1/messages endpoint (Anthropic Messages API format).\nHow OpenCode Configuration Works\n\nConfig File Locations\n\nOpenCode uses XDG base directories via the xdg-basedir npm package, which\nresolves XDG_CONFIG_HOME || ~/.config on every platform — there is no\nmacOS special case. (OpenCode's binary does contain a\n/Library/Application Support/opencode literal, but that is\nsystemManagedConfigDir(), an MDM policy directory at the filesystem root\nwith no $HOME prefix — not the per-user config path.)\n\n| Platform | Global Config Path |\n| ----------- | ----------------------------------------------- |\n| macOS | ~/.config/opencode/opencode.json |\n| Linux | ~/.config/opencode/opencode.json |\n| Windows | ~/.config/opencode/opencode.json (unverified) |\n\nThe macOS row was verified empirically against OpenCode 1.3.13 (embedded\nxdg-basedir source in the shipped binary, plus opencode models confirming\nwhich file is actually loaded). The Windows row follows from the same\nbranch-free resolution code but has not been checked on a Windows machine.\n\nProject-level config: .opencode/opencode.json in any parent directory.\n\nProvider Config Schema\n\nFrom packages/opencode/src/config/config.ts (line 787-846):\n\nHow OpenCode Loads Providers\n\nFrom packages/opencode/src/provider/provider.ts:\nBundled providers are imported directly (line 127-150):\nCustom providers from config's provider field get initialized with their options (including baseURL, apiKey)\nModel definitions come from models.dev API (fetched and cached) + config overrides\nAuto-discovery: if env vars for a provider are set (e.g., ANTHROPIC_API_KEY), that provider loads automatically\n\nThe Key: @ai-sdk/openai-compatible\n\nWhen OpenCode uses a custom provider with npm: \"@ai-sdk/openai-compatible\", it:\nCreates an SDK instance via createOpenAICompatible({ baseURL, apiKey })\nSends requests to {baseURL}/chat/completions (the AI SDK appends the path)\nUses standard OpenAI Chat Completions wire format\nHandles streaming via SSE (data: {\"choices\":[...]} format)\nThe Gap (Closed): What Was Built\n\nEndpoints — Added\n\nThe proxy now exposes both shapes:\n\n| Endpoint | Format | For client | Status |\n| ----------------------------------------- | --------------------------- | ------------ | ------------------------------------- |\n| POST /v1/messages | Anthropic Messages API | Claude Code | Pre-existing |\n| POST /v1/messages/count_tokens | Anthropic | Claude Code | Pre-existing |\n| GET /v1/models (Anthropic format) | Anthropic | Claude Code | Pre-existing","hierarchy":{"lvl0":"Features","lvl1":"OpenCode Support for NeuroLink Proxy","lvl2":"","lvl3":""}},
4053
4037
  {"objectID":"ca403cc4256c3e210d4bd0a84930c5b515e9054daccfff7ce9e14695f52ee105","title":"Status: Implemented & Verified","url":"/docs/features/opencode-proxy-support#status-implemented-verified","content":"This document was originally written as a design proposal. Every item it called out as missing or to-be-built has since been implemented and verified end-to-end (see §11). The \"what was built\" wording in §4 and §8 reflects the delivered state; future-tense language has been kept only where it explains historical context.","hierarchy":{"lvl0":"Features","lvl1":"OpenCode Support for NeuroLink Proxy","lvl2":"Status: Implemented & Verified","lvl3":""}},
4054
4038
  {"objectID":"4c8965a49c9b5a572f67e935ce38d4f7a364c47e6fd1049cada0c45358ee4516","title":"1. Overview","url":"/docs/features/opencode-proxy-support#1-overview","content":"NeuroLink's proxy currently supports Claude Code as a client — when neurolink proxy start runs, it automatically configures Claude Code by writing ANTHROPIC_BASE_URL to ~/.claude/settings.json. Claude Code then sends Anthropic Messages API requests to the proxy, which routes them to any provider.\n\nThis document describes adding OpenCode as a second supported client with the same zero-config experience: neurolink proxy start should auto-configure OpenCode so it connects to the proxy with no manual setup.","hierarchy":{"lvl0":"Features","lvl1":"OpenCode Support for NeuroLink Proxy","lvl2":"1. Overview","lvl3":""}},
@@ -11030,7 +11014,7 @@
11030
11014
  {"objectID":"22bd26e8449443f75bf9c59c06b2c465783f6c12e603a47933dbc0ba49c51553","title":"McpRegistry","url":"/docs/sdk/api-reference#mcpregistry","content":"Registry interface with optional methods for maximum flexibility:","hierarchy":{"lvl0":"Sdk","lvl1":"API Reference","lvl2":"McpRegistry","lvl3":""}},
11031
11015
  {"objectID":"1efe5dcbcb60c44d7b9129d079a965360e0f45a81d93514aa234450b1216818d","title":"Amazon Bedrock Models","url":"/docs/sdk/api-reference#amazon-bedrock-models","content":"Note: Bedrock requires full inference profile ARNs in environment variables.","hierarchy":{"lvl0":"Sdk","lvl1":"API Reference","lvl2":"Amazon Bedrock Models","lvl3":""}},
11032
11016
  {"objectID":"62e1e79f4e6da4712c0b2495abee6b5d94ddd8cfe760520f7bcb738d9ccb336b","title":"Gemini 3 Models (Preview)","url":"/docs/sdk/api-reference#gemini-3-models-preview","content":"Google's latest generation Gemini models with enhanced reasoning capabilities and extended thinking support.\n\nModel Variants:\n\n| Model | Best For | Thinking Default | Speed |\n| ------------------------ | --------------------------- | ---------------- | ------- |\n| gemini-3-flash-preview | Fast tasks, simple queries | low | Fastest |\n| gemini-3-pro-preview | Complex reasoning, analysis | high | Slower |","hierarchy":{"lvl0":"Sdk","lvl1":"API Reference","lvl2":"Gemini 3 Models (Preview)","lvl3":""}},
11033
- {"objectID":"4eba1ce1ca915df76be74a9dc7ec80916d09d12f016ca3ac2e1f7fa1a30b983e","title":"Office Document Types","url":"/docs/sdk/api-reference#office-document-types","content":"Types for processing Office documents (DOCX, PPTX, XLSX):\n\nOffice Document Provider Support:\n\n| Provider | DOCX | PPTX | XLSX | DOC | XLS | Notes |\n| -------------------- | ---- | ---- | ---- | ---- | ---- | ------------------------------------ |\n| AWS Bedrock | Yes | Yes | Yes | Yes | Yes | Full native support via Converse API |\n| Google Vertex AI | Yes | Some | Yes | Some | Some | Best for DOCX and XLSX |\n| Anthropic Claude | Yes | Some | Yes | Some | Some | Via document API |\n| OpenAI | No | No | No | No | No | Not supported |\n| Azure OpenAI | No | No | No | No | No | Not supported |","hierarchy":{"lvl0":"Sdk","lvl1":"API Reference","lvl2":"Office Document Types","lvl3":""}},
11017
+ {"objectID":"4eba1ce1ca915df76be74a9dc7ec80916d09d12f016ca3ac2e1f7fa1a30b983e","title":"Office Document Types","url":"/docs/sdk/api-reference#office-document-types","content":"Office documents (DOCX, PPTX, XLSX) have no input field of their own. They travel in input.files like any other file, and NeuroLink turns them into text for the prompt, so they work with every provider:\n\nThe exported type also declares format, extractTextOnly, maxSizeMB, includeMetadata, processAllSheets, and includeSlideNotes; nothing reads them today. See the Office Documents guide for what the model receives for each format, including DOCX metrics, PPTX tables and speaker notes, and the placeholder note that replaces content a reader cannot extract (legacy .doc/.xls/.ppt, corrupt, or password-protected files).","hierarchy":{"lvl0":"Sdk","lvl1":"API Reference","lvl2":"Office Document Types","lvl3":""}},
11034
11018
  {"objectID":"683e6e39ff52e9b07494eee375b55a3d52c29bf830e7a92cc8314e717a5230f9","title":"Built-in Tools","url":"/docs/sdk/api-reference#built-in-tools","content":"Every NeuroLink instance automatically includes these tools:\n\nExample with Tools:","hierarchy":{"lvl0":"Sdk","lvl1":"API Reference","lvl2":"Built-in Tools","lvl3":""}},
11035
11019
  {"objectID":"79e783c9eccccb8ff6e3ca3c3abf3e652ba0726fc112aedfbebf8334c40a3a01","title":"Provider Tool Support Status","url":"/docs/sdk/api-reference#provider-tool-support-status","content":"| Provider | Tool Support | Notes |\n| ------------ | ------------ | ---------------------------------------------------- |\n| OpenAI | Full | All tools work correctly |\n| Google AI | Full | Excellent tool execution |\n| Anthropic | Full | Reliable tool usage |\n| Azure OpenAI | Full | Same as OpenAI |\n| Mistral | Full | Good tool support |\n| HuggingFace | Partial | Model sees tools but may describe instead of execute |\n| Vertex AI | Partial | Tools available but may not execute |\n| Ollama | Limited | Requires specific models like gemma3n |\n| Bedrock | Full\\* | Requires valid AWS credentials |","hierarchy":{"lvl0":"Sdk","lvl1":"API Reference","lvl2":"Provider Tool Support Status","lvl3":""}},
11036
11020
  {"objectID":"18e03a0273cd7d56fbf74a2c168af25073b99a3c32f56a2fedc7f3404140d6f4","title":"Context Compaction","url":"/docs/sdk/api-reference#context-compaction","content":"Methods for managing conversation context size within model token limits. Requires conversation memory to be enabled.","hierarchy":{"lvl0":"Sdk","lvl1":"API Reference","lvl2":"Context Compaction","lvl3":""}},
@@ -11044,7 +11028,7 @@
11044
11028
  {"objectID":"357bbb718f458d764e00524826a1d42a64da83167df93a52c04d9ddec3651764","title":"Core Events","url":"/docs/sdk/api-reference#core-events","content":"| Event | Emitted When |\n| ------------------ | ------------------------------------ |\n| generation:start | A generate() call begins |\n| generation:end | A generate() call completes |\n| stream:start | A stream() call begins |\n| stream:chunk | A new chunk arrives during streaming |\n| stream:end | Streaming completes normally |\n| stream:complete | Stream fully consumed |\n| stream:error | An error occurs during streaming |\n| tool:start | A tool execution begins |\n| tool:end | A tool execution completes |\n| response:start | A provider response begins |\n| response:end | A provider response completes |","hierarchy":{"lvl0":"Sdk","lvl1":"API Reference","lvl2":"Core Events","lvl3":""}},
11045
11029
  {"objectID":"efcf19aa651c13dbc72ef4b3d0f83986ee180008a076c0db030509880e4d4b1a","title":"MCP Server Events","url":"/docs/sdk/api-reference#mcp-server-events","content":"| Event | Emitted When |\n| -------------------------------- | ----------------------------------------- |\n| externalMCP:serverConnected | An external MCP server connects |\n| externalMCP:serverDisconnected | An external MCP server disconnects |\n| externalMCP:serverFailed | An external MCP server connection fails |\n| externalMCP:toolDiscovered | A new tool is discovered on an MCP server |\n| externalMCP:toolRemoved | A tool is removed from an MCP server |\n| externalMCP:serverAdded | A new MCP server registration is added |\n| externalMCP:serverRemoved | An MCP server registration is removed |","hierarchy":{"lvl0":"Sdk","lvl1":"API Reference","lvl2":"MCP Server Events","lvl3":""}},
11046
11030
  {"objectID":"c4d157804d0d96f1d8571e6aabeff4305aca0c07c151894dee3804d611331de6","title":"Other Events","url":"/docs/sdk/api-reference#other-events","content":"| Event | Emitted When |\n| ---------------------- | ----------------------------------- |\n| tools-register:start | Tool registration process begins |\n| tools-register:end | Tool registration process completes |\n| connected | Connection established |\n| message | General message event |\n| error | An error occurs |\n| log | A log message is emitted |\n| log-event | A structured log event is emitted |\n\nTypedEventEmitter Interface:","hierarchy":{"lvl0":"Sdk","lvl1":"API Reference","lvl2":"Other Events","lvl3":""}},
11047
- {"objectID":"7ff1b31f163c4928ce88a79da3c279d1c1c6351ccf3cc5ad2464d2a03174f308","title":"Related Features","url":"/docs/sdk/api-reference#related-features","content":"Human-in-the-Loop (HITL) - Mark tools with requiresConfirmation: true\nGuardrails Middleware - Set middleware per call, in new NeuroLink({ middleware }) or with configureGlobalMiddleware(); add badWords or modelFilter to filter\nConversation History - Use getConversationHistory() method\nMultimodal Chat - Use images array in generate() options\nAuto Evaluation - Enable with enableEvaluation: true\nCLI Loop Sessions - Interactive mode with persistent state\nProvider Orchestration - Set enableOrchestration: true\nRegional Streaming - Use region parameter in generate()\nOffice Documents - Use officeFiles array for DOCX, PPTX, XLSX\nPDF Support - Use pdfFiles array for PDF documents\nCSV Support - Use csvFiles array for spreadsheet data\nCLI Commands Reference - CLI equivalents for all SDK methods\nConfiguration Guide - Environment variables and config files\nTroubleshooting - Common SDK issues and solutions\n\nBack to Main README | Next: Visual Demos","hierarchy":{"lvl0":"Sdk","lvl1":"API Reference","lvl2":"Related Features","lvl3":""}},
11031
+ {"objectID":"7ff1b31f163c4928ce88a79da3c279d1c1c6351ccf3cc5ad2464d2a03174f308","title":"Related Features","url":"/docs/sdk/api-reference#related-features","content":"Human-in-the-Loop (HITL) - Mark tools with requiresConfirmation: true\nGuardrails Middleware - Set middleware per call, in new NeuroLink({ middleware }) or with configureGlobalMiddleware(); add badWords or modelFilter to filter\nConversation History - Use getConversationHistory() method\nMultimodal Chat - Use images array in generate() options\nAuto Evaluation - Enable with enableEvaluation: true\nCLI Loop Sessions - Interactive mode with persistent state\nProvider Orchestration - Set enableOrchestration: true\nRegional Streaming - Use region parameter in generate()\nOffice Documents - Use the files array (or --file) for DOCX, PPTX, XLSX\nPDF Support - Use pdfFiles array for PDF documents\nCSV Support - Use csvFiles array for spreadsheet data\nCLI Commands Reference - CLI equivalents for all SDK methods\nConfiguration Guide - Environment variables and config files\nTroubleshooting - Common SDK issues and solutions\n\nBack to Main README | Next: Visual Demos","hierarchy":{"lvl0":"Sdk","lvl1":"API Reference","lvl2":"Related Features","lvl3":""}},
11048
11032
  {"objectID":"72ff7213f71cd3e590c196c5a1a39a7ab2af152776936e1a647f228cae34de6e","title":"🔧 SDK Custom Tools Guide","url":"/docs/sdk/custom-tools-guide","content":"🔧 SDK Custom Tools Guide\n\nBuild powerful AI applications by extending NeuroLink with your own custom tools.\n\n📋 Overview\n\nNeuroLink's SDK allows you to register custom tools programmatically, giving your AI assistants access to any functionality you need. All registered tools work seamlessly with the built-in tool system across all supported providers.\n\nKey Features\n✅ Type-Safe: Full TypeScript support with Zod schema validation\n✅ Provider Agnostic: Works with all providers that support tools\n✅ Easy Integration: Simple API for tool registration\n✅ Async Support: All tools run asynchronously\n✅ Error Handling: Graceful error handling built-in\n\n🚀 Quick Start\n\nBasic Tool Registration\n\n⚠️ Common Mistakes\n\n❌ Using schema instead of parameters\n\n❌ Using plain JSON schema as parameters\n\n✅ Correct Zod Schema Format\n\n📖 SimpleTool Interface\n\nAll custom tools implement the SimpleTool interface:\n\nInterface Components\ndescription: Clear, actionable description that helps the AI understand when to use the tool\nparameters: Optional Zod schema for validating inputs (highly recommended)\nexecute: Async function that implements the tool's logic\n\n🛠️ Registration Methods\n\nRegister Single Tool\n\nRegister Multiple Tools\n\nGet Custom Tools\n\n💡 Common Use Cases\nAPI Integration\nDatabase Operations\nData Processing\nFile Operations\nExternal Service Integration\n\n🎯 Best Practices\nClear Descriptions\n\nMake tool descriptions specific and actionable:\nParameter Validation\n\nAlways use Zod schemas for type safety:\nError Handling\n\nHandle errors gracefully:\n\nA returned error is classified as a failure everywhere the SDK reports one,\nexactly as a thrown error is. A result is error-shaped when it carries\nisError: true (the MCP convention), a non-null error field ({ error:\n\"User not found\" }), or a status of \"error\" / \"failed\" / \"failure\" /\n\"fail\". Such a call emits tool:end with success: false and the error\ntext, is stored in session memory as success: false, replays on later turns\nas [called <tool> → error], and is reported with isError: true in\nresult.toolExecutions. The model still receives the full object you\nreturned — classification only affects telemetry and memory, never what the\nmodel sees.\nAsync Operations\n\nAll execute functions must return promises:\nTool Naming\n\nUse clear, consistent naming:\n\n🧪 Testing Your Tools\n\nUnit Testing\n\nIntegration Testing\n\n🔍 Debugging Tools\n\nEnable Debug Mode\n\nLog Tool Execution\n\n🚀 Advanced Patterns\n\nTool Composition\n\nTool Middleware\n\nDynamic Tool Registration\n\nForcing a Tool Call\n\ntoolChoice tells the model whether it must call a tool on a step:\n\n| Value | Effect |\n| --------------------------------- | ------------------------------------------------ |\n| \"auto\" (default) | The model decides whether and which tool to call |\n| \"none\" | No tool calls on any step |\n| \"required\" | The model must call at least one tool |\n| { type: \"tool\", toolName: \"x\" } | The model must call the named tool |\n\nA forced choice (\"required\" or a named tool) is applied only to the first\ntoolChoiceSteps steps of the tool loop — default 1 — after which the\nmodel is free to answer. Holding a forced choice on every step would compel\na tool call on every step, and the turn could only end when maxSteps ran\nout. \"auto\" and \"none\" are applied unchanged on every step.\n\nFor anything finer, prepareStep runs before every step and may return a\ntoolChoice for that step, which takes precedence over toolChoiceSteps:\n\nprepareStep receives { stepNumber, steps, maxSteps, model }, where steps\nholds one record per completed step (its text, tool calls — with input\nalready parsed into an object — tool results, finish reason and usage,\nincluding prompt-cache tokens where the provider reports them). Only the\nreturned toolChoice is honoured; the legacy model and\nexperimental_activeTools / activeTools fields are accepted for source\ncompatibility but ignored, and their presence is logged once as a warning —\nuse toolFilter / excludeTools to scope tools. A hook that throws is\nlogged and that step falls back to the toolChoice / toolChoiceSteps rule;\na hook still pending when the turn is aborted or times out is released with\nthe abort. Both toolChoice and prepareStep apply to stream() as well.\n\nVertex, Google AI Studio and Bedrock do not honour toolChoice at all today.\nSageMaker honours tools, toolChoice and prepareStep on generate()\nonly: its stream() sends the prompt without tools.\n\n📊 Performance Considerations\nTimeout Handling\nCaching\nBatch Operations\n\n🔒 Security Considerations\n\nInput Sanitization\n\nPermission Checking\n\nRate Limiting\n\n🎉 Complete Example\n\nHere's a complete example combining multiple concepts:\n\n🌐 MCP Server Integration\n\nBeyond simple tool registration, NeuroLink SDK supports adding complete MCP (Model Context Protocol) servers for more complex tool ecosystems.\n\nAdding I","hierarchy":{"lvl0":"Sdk","lvl1":"🔧 SDK Custom Tools Guide","lvl2":"","lvl3":""}},
11049
11033
  {"objectID":"fe570104af53b04cac97749a24ce61018428abe7df180a14a7285ebf6fda6fca","title":"🔧 SDK Custom Tools Guide","url":"/docs/sdk/custom-tools-guide#-sdk-custom-tools-guide","content":"Build powerful AI applications by extending NeuroLink with your own custom tools.","hierarchy":{"lvl0":"Sdk","lvl1":"🔧 SDK Custom Tools Guide","lvl2":"🔧 SDK Custom Tools Guide","lvl3":""}},
11050
11034
  {"objectID":"4c744b8358a0761297815b9e1244bad43bebb4ece00ddac4cb24b186dbae5647","title":"📋 Overview","url":"/docs/sdk/custom-tools-guide#-overview","content":"NeuroLink's SDK allows you to register custom tools programmatically, giving your AI assistants access to any functionality you need. All registered tools work seamlessly with the built-in tool system across all supported providers.","hierarchy":{"lvl0":"Sdk","lvl1":"🔧 SDK Custom Tools Guide","lvl2":"📋 Overview","lvl3":""}},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/neurolink",
3
- "version": "13.4.1",
3
+ "version": "13.4.2",
4
4
  "packageManager": "pnpm@10.15.1",
5
5
  "description": "The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002/call) for routing, tool selection and context budgeting. MCP-native (4 transports), voice TTS/STT/realtime, RAG, agents, memory, compaction, 9 observability exporters. OpenAI · Anthropic · Gemini · Bedrock · Azure · Ollama · TypeSafe Jev and more.",
6
6
  "author": {
@@ -236,7 +236,7 @@
236
236
  "// CI tier — fast, no live AI calls, safe for every commit (test:unit; also see the separate provider-safety-net CI job, which runs build + test:providers-mocked + test:provider-structure + test:error-classifier-contract on every PR)": "",
237
237
  "test:tool-routing": "pnpm exec tsx test/continuous-test-suite-tool-routing.ts",
238
238
  "test:tool-routing-semantic": "pnpm exec tsx test/continuous-test-suite-tool-routing-semantic.ts",
239
- "test:unit": "pnpm run test:bugfixes && pnpm run test:mcp:infra && pnpm run test:mcp:registry && pnpm run test:mcp:spans && pnpm run test:tool-routing && pnpm run test:tool-routing-cli && pnpm run test:tool-dedup && pnpm run test:model-pool && pnpm run test:classifier-router && pnpm run test:tool-routing-semantic && pnpm run test:mcp-result-cache && pnpm run test:mcp-direct-name-repair && pnpm run test:mcp-breaker-resolved-errors && pnpm run test:archive:security && pnpm run test:office:security && pnpm run test:image-exif && pnpm run test:vector-chroma && pnpm run test:vector-pgvector && pnpm run test:vector-pinecone && pnpm run test:provider-wiring && pnpm run test:docs-mcp && pnpm run test:retired-model-defaults && pnpm run test:cli-fallback && pnpm run test:embedding-response-validation && pnpm run test:xiaomi-mimo-pilot && pnpm run test:rag-bounds && pnpm run test:longcat-pilot && pnpm run test:runinfra-pilot && pnpm run test:catalog-output-ceiling && pnpm run test:package-declarations && pnpm run test:realtime-voice",
239
+ "test:unit": "pnpm run test:bugfixes && pnpm run test:mcp:infra && pnpm run test:mcp:registry && pnpm run test:mcp:spans && pnpm run test:tool-routing && pnpm run test:tool-routing-cli && pnpm run test:tool-dedup && pnpm run test:model-pool && pnpm run test:classifier-router && pnpm run test:tool-routing-semantic && pnpm run test:mcp-result-cache && pnpm run test:mcp-direct-name-repair && pnpm run test:mcp-breaker-resolved-errors && pnpm run test:archive:security && pnpm run test:office && pnpm run test:office:security && pnpm run test:image-exif && pnpm run test:vector-chroma && pnpm run test:vector-pgvector && pnpm run test:vector-pinecone && pnpm run test:provider-wiring && pnpm run test:docs-mcp && pnpm run test:retired-model-defaults && pnpm run test:cli-fallback && pnpm run test:embedding-response-validation && pnpm run test:xiaomi-mimo-pilot && pnpm run test:rag-bounds && pnpm run test:longcat-pilot && pnpm run test:runinfra-pilot && pnpm run test:catalog-output-ceiling && pnpm run test:package-declarations && pnpm run test:realtime-voice",
240
240
  "// CI tier — live providers, runs only when API keys are present (test:credentials and test:dynamic make real provider calls when keys are set, so they live here, not in test:unit; test:matrix, a different suite covering the full provider capability matrix, runs nightly via .github/workflows/live-matrix.yml — test:providers itself is still only wired into test:live, not any GitHub Actions workflow)": "",
241
241
  "test:live": "pnpm run test:providers && pnpm run test:mcp:http && pnpm run test:mcp:sdk && pnpm run test:mcp:cli && pnpm run test:observability && pnpm run test:context && pnpm run test:memory && pnpm run test:tool-reliability && pnpm run test:evaluation && pnpm run test:autoresearch && pnpm run test:credentials && pnpm run test:dynamic && pnpm run test:model-not-found-retryable",
242
242
  "// CI tier — product output (image/video/TTS/PPT) — costs $$ per run (not wired into any GitHub Actions workflow as of this comment; run manually or add to live-matrix.yml if nightly coverage is needed)": "",