@juspay/neurolink 12.49.0 → 12.49.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.
@@ -220,9 +220,15 @@ export function createGeminiLoopAdapter(config) {
220
220
  },
221
221
  mapFinishReason(rawStopReason, hadToolCallsAtCap) {
222
222
  const mapped = mapGeminiFinishReason(rawStopReason);
223
- // A turn cut off at the step cap ended because of the cap, not because
224
- // the last response said "STOP".
225
- return hadToolCallsAtCap && mapped === "stop" ? "tool-calls" : mapped;
223
+ // "tool-calls" from this hook means the step cap cut the turn off with
224
+ // calls still pending, so a last response that said "STOP" does not make
225
+ // it a finished turn. Gemini's own tool-call limit (TOO_MANY_TOOL_CALLS)
226
+ // also maps to "tool-calls" on the turn's result, but it is not that
227
+ // cap, so it counts here only when the cap was actually hit.
228
+ if (mapped === "stop" || mapped === "tool-calls") {
229
+ return hadToolCallsAtCap ? "tool-calls" : "stop";
230
+ }
231
+ return mapped;
226
232
  },
227
233
  };
228
234
  }
@@ -662,7 +662,7 @@ const HAND_DESCRIPTORS = [
662
662
  // (hosted service or model: unknown), despite the documented 64K. The local
663
663
  // 1,500-token estimate refuses before every measured cut. On 2026-10-04,
664
664
  // both models read facts at the original clef-flash lower bounds for logs,
665
- // number lists, digit arrays and compact JSON, but not about 2.5% further on;
665
+ // number lists, digit arrays and compact JSON, but not 2.5% to 3.1% further on;
666
666
  // English prose and random CJK already matched on both. Digits cost 1,
667
667
  // ASCII symbols 0.75, BMP non-ASCII 1.5 and astral characters 3 tokens.
668
668
  // Natural Chinese, Japanese, Korean and Hindi prose and emoji-rich English
@@ -684,13 +684,14 @@ const HAND_DESCRIPTORS = [
684
684
  // Retain the conservative 256,000-byte encoded-body cap: on 2026-10-04
685
685
  // both models accepted 520,000 text characters and refused 525,000 with
686
686
  // 413/code 5021. On 2026-10-03, clef-flash accepted 262,000 and refused
687
- // 270,000. Estimates match encoded body characters / 4, rounded up. The
687
+ // 270,000. Estimates are the encoded body bytes / 4, give or take one. The
688
688
  // threshold moved from 65,527 accepted / 67,527 refused to 130,026 /
689
689
  // 131,276 (clef) and 130,027 / 131,277 (flash); errors still print 65,536.
690
690
  // Inference: the new interval contains 131,072 (twice the printed
691
691
  // figure); reason unknown.
692
- // The new image-byte ceiling was not measured; the old 195/202 KB PNG boundary
693
- // is historical. See the guide for exact model and date coverage.
692
+ // On 2026-10-05 both models accepted PNG bodies up to 492,485 bytes and
693
+ // refused 532,505 (flash) and 532,499 (clef) with the same 413; the old 195/202 KB boundary is
694
+ // historical. See the guide for exact model and date coverage.
694
695
  media: { maxImages: 4, video: false, maxRequestBytes: 256_000 },
695
696
  },
696
697
  setupUrl: "https://dash.cloudflare.com/profile/api-tokens",
@@ -24,6 +24,12 @@ const SUPPORTED_IMAGE_TYPES = new Set([
24
24
  */
25
25
  const TRAILING_REQUEST_ID = /\(([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\)\s*$/i;
26
26
  const MAX_ERROR_MESSAGE_CHARS = 500;
27
+ /**
28
+ * The code on the 429 an account gets once it has used its daily free
29
+ * allocation of 10,000 neurons (seen 2026-10-05). Unlike the capacity 429
30
+ * (3040), nothing changes within a retry's backoff, so it is not retried.
31
+ */
32
+ const DAILY_ALLOCATION_CODE = 4006;
27
33
  /**
28
34
  * An error message is cut to this before any pattern runs on it, so a hostile or
29
35
  * garbled body cannot hold the event loop. Cloudflare's own messages are far
@@ -317,7 +323,9 @@ export class CloudflareClefProvider extends SystemOneDecisionProvider {
317
323
  message,
318
324
  status,
319
325
  requestId: requestId ?? parsed?.requestId,
320
- retryable: kind === "rate_limit" || kind === "overloaded" || kind === "server",
326
+ retryable: (kind === "rate_limit" && parsed?.code !== DAILY_ALLOCATION_CODE) ||
327
+ kind === "overloaded" ||
328
+ kind === "server",
321
329
  };
322
330
  }
323
331
  /**
@@ -110,21 +110,35 @@ export declare function computeMaxSteps(rawMaxSteps?: number): number;
110
110
  * Map a `@google/genai` `Candidate.finishReason` enum value onto NeuroLink's
111
111
  * unified finish reason, mirroring anthropic.ts `mapAnthropicStopReason`.
112
112
  *
113
- * Enum values per `@google/genai` `FinishReason`: STOP, MAX_TOKENS, SAFETY,
114
- * RECITATION, LANGUAGE, OTHER, BLOCKLIST, PROHIBITED_CONTENT, SPII,
115
- * MALFORMED_FUNCTION_CALL, IMAGE_SAFETY, UNEXPECTED_TOOL_CALL,
116
- * FINISH_REASON_UNSPECIFIED. Unknown / unset / non-terminal values default to
117
- * "stop" (a clean completion is the safe assumption).
113
+ * Every member of `@google/genai`'s `FinishReason` and where it lands:
114
+ *
115
+ * - "length": MAX_TOKENS, and CONTINUATION (the response hit the per-request
116
+ * token limit before the model was done; it can be continued with the
117
+ * returned continuation token)
118
+ * - "tool-calls": TOO_MANY_TOOL_CALLS (the model called tools consecutively
119
+ * until the system cut the turn off, so it still wanted tools)
120
+ * - "error": MALFORMED_FUNCTION_CALL, UNEXPECTED_TOOL_CALL
121
+ * - "content-filter": SAFETY, RECITATION, BLOCKLIST, PROHIBITED_CONTENT, SPII,
122
+ * LANGUAGE (generation stopped over an unsupported language), and the image
123
+ * refusals IMAGE_SAFETY, IMAGE_PROHIBITED_CONTENT, IMAGE_RECITATION
124
+ * - "stop": STOP, and the members that name no cause the unified type can
125
+ * carry: OTHER, IMAGE_OTHER, NO_IMAGE, FINISH_REASON_UNSPECIFIED. An unknown
126
+ * or unset value also reads "stop" (a clean completion is the safe
127
+ * assumption), so a member a newer SDK adds needs an explicit case here.
118
128
  *
119
129
  * Returns a plain string (not a `{ unified, raw }` object): the Vertex result
120
130
  * builders and the consuming layer (neurolink.ts `finishReason || "unknown"`
121
131
  * and `finishReason === "length"`) compare against plain strings.
122
132
  *
123
133
  * MALFORMED_FUNCTION_CALL / UNEXPECTED_TOOL_CALL map to "error", NOT
124
- * "tool-calls": they are provider/model failures, while "tool-calls" is the
125
- * exclusive contract for "step budget exhausted while the model still wanted
126
- * tools" — consumers (e.g. curator's step-cap intercept) branch on it and
127
- * were rendering fake step-limit messages for 2-4-step malformed-call turns.
134
+ * "tool-calls": they are provider/model failures, while "tool-calls" means the
135
+ * turn ended with the model still wanting tools because a tool-call budget ran
136
+ * out: the loop's own step cap, or Gemini's TOO_MANY_TOOL_CALLS limit. Consumers
137
+ * (e.g. curator's step-cap intercept) branch on it and were rendering fake
138
+ * step-limit messages for 2-4-step malformed-call turns. `stopReason` is the
139
+ * discriminator that tells the two budgets apart: TOO_MANY_TOOL_CALLS reads
140
+ * "tool-calls" here but stays `stopReason: "completed"`, because `maxSteps` did
141
+ * not run out.
128
142
  */
129
143
  export declare function mapGeminiFinishReason(raw: string | null | undefined): "stop" | "length" | "tool-calls" | "content-filter" | "error";
130
144
  /**
@@ -491,26 +491,43 @@ export function computeMaxSteps(rawMaxSteps) {
491
491
  * Map a `@google/genai` `Candidate.finishReason` enum value onto NeuroLink's
492
492
  * unified finish reason, mirroring anthropic.ts `mapAnthropicStopReason`.
493
493
  *
494
- * Enum values per `@google/genai` `FinishReason`: STOP, MAX_TOKENS, SAFETY,
495
- * RECITATION, LANGUAGE, OTHER, BLOCKLIST, PROHIBITED_CONTENT, SPII,
496
- * MALFORMED_FUNCTION_CALL, IMAGE_SAFETY, UNEXPECTED_TOOL_CALL,
497
- * FINISH_REASON_UNSPECIFIED. Unknown / unset / non-terminal values default to
498
- * "stop" (a clean completion is the safe assumption).
494
+ * Every member of `@google/genai`'s `FinishReason` and where it lands:
495
+ *
496
+ * - "length": MAX_TOKENS, and CONTINUATION (the response hit the per-request
497
+ * token limit before the model was done; it can be continued with the
498
+ * returned continuation token)
499
+ * - "tool-calls": TOO_MANY_TOOL_CALLS (the model called tools consecutively
500
+ * until the system cut the turn off, so it still wanted tools)
501
+ * - "error": MALFORMED_FUNCTION_CALL, UNEXPECTED_TOOL_CALL
502
+ * - "content-filter": SAFETY, RECITATION, BLOCKLIST, PROHIBITED_CONTENT, SPII,
503
+ * LANGUAGE (generation stopped over an unsupported language), and the image
504
+ * refusals IMAGE_SAFETY, IMAGE_PROHIBITED_CONTENT, IMAGE_RECITATION
505
+ * - "stop": STOP, and the members that name no cause the unified type can
506
+ * carry: OTHER, IMAGE_OTHER, NO_IMAGE, FINISH_REASON_UNSPECIFIED. An unknown
507
+ * or unset value also reads "stop" (a clean completion is the safe
508
+ * assumption), so a member a newer SDK adds needs an explicit case here.
499
509
  *
500
510
  * Returns a plain string (not a `{ unified, raw }` object): the Vertex result
501
511
  * builders and the consuming layer (neurolink.ts `finishReason || "unknown"`
502
512
  * and `finishReason === "length"`) compare against plain strings.
503
513
  *
504
514
  * MALFORMED_FUNCTION_CALL / UNEXPECTED_TOOL_CALL map to "error", NOT
505
- * "tool-calls": they are provider/model failures, while "tool-calls" is the
506
- * exclusive contract for "step budget exhausted while the model still wanted
507
- * tools" — consumers (e.g. curator's step-cap intercept) branch on it and
508
- * were rendering fake step-limit messages for 2-4-step malformed-call turns.
515
+ * "tool-calls": they are provider/model failures, while "tool-calls" means the
516
+ * turn ended with the model still wanting tools because a tool-call budget ran
517
+ * out: the loop's own step cap, or Gemini's TOO_MANY_TOOL_CALLS limit. Consumers
518
+ * (e.g. curator's step-cap intercept) branch on it and were rendering fake
519
+ * step-limit messages for 2-4-step malformed-call turns. `stopReason` is the
520
+ * discriminator that tells the two budgets apart: TOO_MANY_TOOL_CALLS reads
521
+ * "tool-calls" here but stays `stopReason: "completed"`, because `maxSteps` did
522
+ * not run out.
509
523
  */
510
524
  export function mapGeminiFinishReason(raw) {
511
525
  switch (raw) {
512
526
  case "MAX_TOKENS":
527
+ case "CONTINUATION":
513
528
  return "length";
529
+ case "TOO_MANY_TOOL_CALLS":
530
+ return "tool-calls";
514
531
  case "MALFORMED_FUNCTION_CALL":
515
532
  case "UNEXPECTED_TOOL_CALL":
516
533
  return "error";
@@ -519,7 +536,10 @@ export function mapGeminiFinishReason(raw) {
519
536
  case "BLOCKLIST":
520
537
  case "PROHIBITED_CONTENT":
521
538
  case "SPII":
539
+ case "LANGUAGE":
522
540
  case "IMAGE_SAFETY":
541
+ case "IMAGE_PROHIBITED_CONTENT":
542
+ case "IMAGE_RECITATION":
523
543
  return "content-filter";
524
544
  default:
525
545
  return "stop";
@@ -4604,6 +4604,7 @@
4604
4604
  {"objectID":"8569960f5df3455464e766e118794ee1116e63943713b4e396669abb164ea759","title":"stopReason — the turn-exit discriminator","url":"/docs/features/turn-time-budget#stopreason-the-turn-exit-discriminator","content":"finishReason is provider-shaped and historically overloaded (\"tool-calls\"\ncovered both step-cap exits and Gemini MALFORMED_FUNCTION_CALL failures).\nBranch on result.stopReason instead:\n\n| stopReason | Meaning |\n| ---------------- | ------------------------------------------------------------------ |\n| completed | The model finished on its own (text answer or final_result) |\n| step-cap | The maxSteps budget ran out while the model still wanted tools |\n| time-limit | The turnTimeoutMs (or defensive) wall-clock deadline passed |\n| stalled | No progress for stallTimeoutMs |\n| aborted | The caller's abortSignal ended the turn |\n| context-cap | The in-loop context guard stopped the turn (Vertex loops only) |\n| provider-error | Provider/model failure (e.g. persistent MALFORMED_FUNCTION_CALL) |\n\nA loop only reports what it can observe. The AI Studio loops never report\ncontext-cap, because their context guard reclaims room or does nothing — it\nhas no stop-the-turn branch to report.\n\nAlso on the result: rawFinishReason (the verbatim provider value, e.g.\nMALFORMED_FUNCTION_CALL, max_tokens) and stepsUsed. On stream()\nresults, read metadata.stopReason / metadata.rawFinishReason /\nmetadata.stepsUsed after draining the stream — background loops resolve\nthem at close, and metadata is the mutable reference that survives wrapper\nspreads.\n\nProviders without a native loop leave stopReason undefined — keep any\nlegacy finishReason heuristics as a fallback.","hierarchy":{"lvl0":"Features","lvl1":"Turn Time Budget","lvl2":"stopReason — the turn-exit discriminator","lvl3":""}},
4605
4605
  {"objectID":"beefbc9fd412625dfb71572fe43e8c19a1634aa91a3778825806507e43eb5f84","title":"Honest terminal messages","url":"/docs/features/turn-time-budget#honest-terminal-messages","content":"Each exit cause has its own user-facing message; the step-cap text\n(\"...reached the N-step limit...\") is emitted only when step >= maxSteps\ngenuinely terminated the loop:\ntime-limit: _\"I had to stop after Xm Ys — this turn hit its processing time\n limit. I completed N tool calls before stopping; ask me to continue and\n I'll pick up from there.\"_\nstalled: _\"I had to stop because this turn made no progress for Xs — a tool\n or model call appears to be stuck. ...\"_\naborted: \"This turn was stopped before I could finish. ...\"","hierarchy":{"lvl0":"Features","lvl1":"Turn Time Budget","lvl2":"Honest terminal messages","lvl3":""}},
4606
4606
  {"objectID":"8a1f451537135b3f1ef892866610bb0dbabfe58ed1764bac2753046b8da98222","title":"MALFORMED_FUNCTION_CALL handling","url":"/docs/features/turn-time-budget#malformed_function_call-handling","content":"Gemini's MALFORMED_FUNCTION_CALL / UNEXPECTED_TOOL_CALL finish reasons\nmap to unified finishReason: \"error\" (never \"tool-calls\"). A\nMALFORMED_FUNCTION_CALL step is retried once with a corrective note;\nif it persists, the turn ends with stopReason: \"provider-error\" — usually\nworth a caller-side retry.","hierarchy":{"lvl0":"Features","lvl1":"Turn Time Budget","lvl2":"MALFORMED_FUNCTION_CALL handling","lvl3":""}},
4607
+ {"objectID":"b858770b3853e797dfaac8ecfbd0c1f86c320e6a94e46a2e60f8407f328f6090","title":"Other Gemini finish reasons","url":"/docs/features/turn-time-budget#other-gemini-finish-reasons","content":"The native Gemini loops (AI Studio and Vertex) map the SDK's finish reason onto\nthe unified values below and keep the verbatim value in rawFinishReason.\nVertex puts the unified value on finishReason; on AI Studio it is the\nunified field of the finish part that model middleware receives.\n\n| Gemini finish reason | finishReason |\n| ----------------------------------------------------------------------------------------- | ---------------- |\n| MAX_TOKENS, CONTINUATION (token limit reached before the model was done) | length |\n| TOO_MANY_TOOL_CALLS (the model called tools until the system cut the turn off) | tool-calls |\n| MALFORMED_FUNCTION_CALL, UNEXPECTED_TOOL_CALL | error |\n| SAFETY, RECITATION, BLOCKLIST, PROHIBITED_CONTENT, SPII, LANGUAGE, IMAGE_*¹ | content-filter |\n| STOP, OTHER, FINISH_REASON_UNSPECIFIED, IMAGE_OTHER, NO_IMAGE | stop |\n\n¹ IMAGE_SAFETY, IMAGE_PROHIBITED_CONTENT and IMAGE_RECITATION.\n\ntool-calls also marks a turn that ran out of maxSteps, so branch on\nstopReason to tell the two apart: TOO_MANY_TOOL_CALLS leaves\nstopReason: \"completed\", a spent step budget reports step-cap. A value the\nSDK adds later reads stop until it is mapped.","hierarchy":{"lvl0":"Features","lvl1":"Turn Time Budget","lvl2":"Other Gemini finish reasons","lvl3":""}},
4607
4608
  {"objectID":"a975fa8c9a970f09409f0cd78f26180dbef30bebfc60396f0eebda7776d8a3c3","title":"Telemetry","url":"/docs/features/turn-time-budget#telemetry","content":"result.analytics (when enableAnalytics is on) carries stepsUsed,\n toolCallCount, stopReason, elapsedMs, rawFinishReason.\nThe SDK emitter fires turn:lifecycle events (alongside\n tool:start/tool:end) for non-completed exits, tool timeouts, and\n malformed-call retries:","hierarchy":{"lvl0":"Features","lvl1":"Turn Time Budget","lvl2":"Telemetry","lvl3":""}},
4608
4609
  {"objectID":"4237dd71854673dfa0c8c155353abb6bf61149758ab7cd851436a49841b8dba3","title":"Video Analysis","url":"/docs/features/video-analysis","content":"Video Analysis\n\nComprehensive video analysis for NeuroLink, powered by Gemini 2.0 Flash. This feature goes beyond basic visual description—it provides a deep logical audit of video sequences to understand \"why\" and \"how\" events occur.\n\nKey Capabilities\nLogical Analysis: Dissect any video to extract the underlying intent, cause-and-effect, and logical progression.\nAction-Reaction Chain: A step-by-step audit of user or system actions and their immediate visual results.\nEvidence-Based Reporting: Detailed reasoning backed by structured visual indicators (colors, labels, text) in JSON format.\nStrategic Verdicts: High-level assessments of whether a workflow succeeded or failed logically.\n\nQuick Start\n\nHow It Works\nFrame Extraction: The system uses ffmpeg to extract high-quality keyframes from the video at calculated intervals.\nAnalysis Pipeline: These frames are sent to Gemini 2.0 Flash with a specialized system instruction focused on critical logic auditing.\nUnified Results: The resulting report is added directly to your standard generation output.\n\nUsage\n\nCLI Usage\n\nAnalyze any video file with a natural language prompt.\n\nSDK Usage\n\nIntegrate video analysis into your TypeScript/JavaScript projects.\n\nAdvanced SDK Examples\n\nCustom Model Configuration\nFine-tune the analysis by adjusting token limits and temperature.\n\nDisabling Tool Interference\nBy default, the model might try to use available tools. For pure video analysis, you can disable them.\n\nExamples\nUI/UX Bug Analysis\n\nIdentify why a user is unable to complete a form or where the interface is misleading.\n\nPrompt: \"Find why the user is getting stuck at the payment step. Look for validation errors or hidden UI elements.\"\nSilent Failure Detection\n\nDetect cases where an action is taken but the system provides no feedback (no loaders, no success messages).\n\nPrompt: \"Audit the 'Submit' button click. Is there a visual 'bond' between the click and the next state? Report any lag or missing loading indicators.\"\nWorkflow Validation\n\nVerify if a complex multi-step process follows the intended business logic.\n\nPrompt: \"Trace the logical progression from 'Item Selection' to 'Checkout'. Does every state change correspond to a user action?\"\nComparison Analysis\n\nCompare two recordings to find discrepancies in behavior.\n\nPrompt: \"Compare these two clips. The first one is the expected behavior and the second one has a bug. Identify the exact frame or timestamp where the logic deviates.\"\n\nCommand Gallery\n\nQuick CLI recipes for common tasks:\n\nThe Analysis Report\n\nThe output is structured into four major sections designed to give you a complete understanding of the video:\nStrategic Overview & Intent: Defines the core activity, expected logic, and provides a primary verdict.\nThe Action-Reaction Chain: A granular, step-by-step audit of attempts, results, and technical inferences.\nCritical Findings: Categorized milestones or anomalies with root cause analysis and visual evidence in JSON.\nFinal Assessment: A conclusive summary of the logical flow based on the observed evidence.\n\nBest Practices\nFrame Depth: Short videos (under 10s) get high-density frame coverage (1 per second), while long ones are intelligently sampled.\nPrompt Precision: While the model is a \"Critical Logic Auditor,\" you can guide it with specific questions about the activity.\nFormat: The analysis is returned as text in result.content, making it easy to store, display, or pipe to other tools.","hierarchy":{"lvl0":"Features","lvl1":"Video Analysis","lvl2":"","lvl3":""}},
4609
4610
  {"objectID":"288c031674e78fd4fcd753b2d753bff8b085367a321fac3e9845113df6361a2d","title":"Video Analysis","url":"/docs/features/video-analysis#video-analysis","content":"Comprehensive video analysis for NeuroLink, powered by Gemini 2.0 Flash. This feature goes beyond basic visual description—it provides a deep logical audit of video sequences to understand \"why\" and \"how\" events occur.","hierarchy":{"lvl0":"Features","lvl1":"Video Analysis","lvl2":"Video Analysis","lvl3":""}},
@@ -5665,16 +5666,17 @@
5665
5666
  {"objectID":"592a6f5702dc95c7cba68e1233dc74e8d60465eb77496a4313b4a096757237b3","title":"2. Configure","url":"/docs/getting-started/providers/cloudflare-clef#2-configure","content":"`bash","hierarchy":{"lvl0":"Getting Started","lvl1":"Cloudflare Clef Provider Guide","lvl2":"2. Configure","lvl3":""}},
5666
5667
  {"objectID":"de4ffe6ae22db4a0719caae8e38b4a0a8a438224c94701a762c9e1f4cc209393","title":"Optional","url":"/docs/getting-started/providers/cloudflare-clef#optional","content":"typescript\n\nconst neurolink = new NeuroLink({\n credentials: {\n cloudflareClef: { apiKey: \"…\", accountId: \"…\" }, // baseURL is optional\n },\n});\n`\n\nBoth the token and the account id are needed: the account id is part of the\nroute, so a token alone does not count as configured.","hierarchy":{"lvl0":"Getting Started","lvl1":"Cloudflare Clef Provider Guide","lvl2":"Optional","lvl3":""}},
5667
5668
  {"objectID":"0b26521b87bd72415fe58482c8628d4c3d04a49575ca2e89a55f29cf65834ccc","title":"3. Use it","url":"/docs/getting-started/providers/cloudflare-clef#3-use-it","content":"The figures in the comments are what a live call to clef returned for this\nexample on 2026-10-03, rounded; clef-flash answered the same example with\n0.96, 0.82 and 0.50, 2.72. Pick the faster model for one call with\nmodel: \"clef-flash\".","hierarchy":{"lvl0":"Getting Started","lvl1":"Cloudflare Clef Provider Guide","lvl2":"3. Use it","lvl3":""}},
5668
- {"objectID":"251d84b27d167ed1d24cad4c91fb45246bf057457ea226ad977f4e581af03d28","title":"Images","url":"/docs/getting-started/providers/cloudflare-clef#images","content":"Pass up to four images beside the state, as a Buffer, a file path or a\ndata:image/…;base64, URL; an http(s) URL is refused. PNG, JPEG and WebP are\nread; image/jpg is accepted as a JPEG alias and sent as image/jpeg. Other formats are refused before they are sent.\nThey travel in their own images array, not inside the state. Cloudflare\n places them before the state.\nThe Workers AI API accepts no video. Its model page says it does, but the API refuses\n a video and has no field for one, so NeuroLink refuses a video too.\nPixels: Cloudflare documents 16 megapixels an image. 16.00 megapixels were\n accepted (4096 × 3900 at 15.97 MP, 8000 × 2000 and 16000 × 1000 at 16.00 MP);\n 16.38 megapixels (4096 × 4000) were refused with a 422. The limit is on the\n pixel count, not on either side.\nCost: an image costs at most about 1,000 input tokens however large it is.\n A test request with one 512 × 512 image counted 389 input tokens in all, one\n with a 1,024 × 1,024 image counted 1,157, and larger images up to the pixel\n limit counted between 1,125 and 1,157.\nHow many: exactly four tiny PNG/JPEG/WebP images succeeded on both models\n on 2026-10-04; a fifth was refused with a 422. Four is also NeuroLink's limit.\nNeuroLink's size limit is 256,000 bytes for the encoded request body,\n including base64 image data. A 195 KB PNG encodes to about 260,000 characters\n and is refused locally. Resize or compress a photo to well under 190 KB first.\n The 2026-10-03 API probe accepted a 195 KB PNG and refused a 202 KB one.\n On 2026-10-04 the text-only request ceiling moved (see below); the current\n image-byte ceiling was not remeasured, so those image figures are historical.","hierarchy":{"lvl0":"Getting Started","lvl1":"Cloudflare Clef Provider Guide","lvl2":"Images","lvl3":""}},
5669
+ {"objectID":"251d84b27d167ed1d24cad4c91fb45246bf057457ea226ad977f4e581af03d28","title":"Images","url":"/docs/getting-started/providers/cloudflare-clef#images","content":"Pass up to four images beside the state, as a Buffer, a file path or a\ndata:image/…;base64, URL; an http(s) URL is refused. PNG, JPEG and WebP are\nread; image/jpg is accepted as a JPEG alias and sent as image/jpeg. Other formats are refused before they are sent.\nThey travel in their own images array, not inside the state. Cloudflare\n places them before the state.\nThe Workers AI API accepts no video. Its model page says it does, but the API refuses\n a video and has no field for one, so NeuroLink refuses a video too.\nPixels: Cloudflare documents 16 megapixels an image. 16.00 megapixels were\n accepted (4096 × 3900 at 15.97 MP, 8000 × 2000 and 16000 × 1000 at 16.00 MP);\n 16.38 megapixels (4096 × 4000) were refused with a 422. The limit is on the\n pixel count, not on either side.\nCost: an image costs at most about 1,000 input tokens however large it is.\n A test request with one 512 × 512 image counted 389 input tokens in all, one\n with a 1,024 × 1,024 image counted 1,157, and larger images up to the pixel\n limit counted between 1,125 and 1,157.\nHow many: exactly four tiny PNG/JPEG/WebP images succeeded on both models\n on 2026-10-04; a fifth was refused with a 422. Four is also NeuroLink's limit.\nNeuroLink's size limit is 256,000 bytes for the encoded request body,\n including base64 image data. A 195 KB PNG encodes to about 260,000 characters\n and is refused locally. Resize or compress a photo to well under 190 KB first.\n The 2026-10-03 API probe accepted a 195 KB PNG and refused a 202 KB one.\n That boundary has since moved: on 2026-10-05 both models accepted PNG\n requests with encoded bodies up to 492,485 bytes and refused 532,505 bytes\n (clef-flash) and 532,499 (clef) (see below), so the 195/202 KB figures are historical and NeuroLink's cap is\n the stricter limit.","hierarchy":{"lvl0":"Getting Started","lvl1":"Cloudflare Clef Provider Guide","lvl2":"Images","lvl3":""}},
5669
5670
  {"objectID":"f98057fa646a175aee28fef3b525786c83a66b8ac8489feec28fd872866cf4ab","title":"When NeuroLink uses it","url":"/docs/getting-started/providers/cloudflare-clef#when-neurolink-uses-it","content":"Built-in features that call decide() pick the first decision provider that is\nconfigured, in this order: TypeSafe, Laya, XOR, Perplexity, then Clef. A host\nwith none of the first four, but with CLOUDFLARE_API_KEY and\nCLOUDFLARE_ACCOUNT_ID set for the Workers AI text provider, therefore has Clef\nas its default decision provider. Naming provider: \"cloudflare-clef\" reaches it\nwhatever else is configured.\n\nBecause of the state window below, a built-in feature whose state is longer than\nabout 1,500 estimated tokens gets a refusal from Clef, which each of them treats\nas \"carry on as before\". Clef suits short decisions: routing a request, a\nguardrail on one action, classifying one message or one picture.","hierarchy":{"lvl0":"Getting Started","lvl1":"Cloudflare Clef Provider Guide","lvl2":"When NeuroLink uses it","lvl3":""}},
5670
5671
  {"objectID":"69f3db3e89a8fd474930cba6df7b01125fa2d9dd41aaadf8d8838423632ace30","title":"What is sent to Cloudflare","url":"/docs/getting-started/providers/cloudflare-clef#what-is-sent-to-cloudflare","content":"boolean is the SDK's name for the wire's noul. model is sent although the\npath already names it: Cloudflare's schema marks it required, and a body whose\nmodel differs from the path is refused. A request with no model was accepted\nlive and answered by clef-flash, so sending it matters only for following the\nschema. Cloudflare wraps every answer in its own\nenvelope, and NeuroLink reads the answers out of it:\n\nThe request id is the cf-ai-req-id response header; where that is absent (a\nrejected token never reaches the model) it is the edge's cf-ray.","hierarchy":{"lvl0":"Getting Started","lvl1":"Cloudflare Clef Provider Guide","lvl2":"What is sent to Cloudflare","lvl3":""}},
5671
5672
  {"objectID":"37eb6d126d3af6ca22085fbf94025a8f23da15691c8f6070b946f5aaa27e2f10","title":"One token, two providers","url":"/docs/getting-started/providers/cloudflare-clef#one-token-two-providers","content":"cloudflare-clef and cloudflare read the same two variables, but each has its\nown credentials slice, so the two cannot be mixed up:\n\n| | cloudflare (text) | cloudflare-clef (decide) |\n| --------------- | --------------------------- | ---------------------------- |\n| Token | CLOUDFLARE_API_KEY | CLOUDFLARE_API_KEY |\n| Account id | CLOUDFLARE_ACCOUNT_ID | CLOUDFLARE_ACCOUNT_ID |\n| SDK credentials | credentials.cloudflare | credentials.cloudflareClef |\n| Serves | generate() and stream() | decide() only |\n\ncredentials.cloudflare does not configure decide. Setting the two\nvariables for the text provider also lets decide() use Clef when no other\ndecision provider is configured, and no switch turns that off while the two\nvariables are set in the environment. A host that wants the Workers AI text\nprovider without Clef can give the text provider its token and account id only\nthrough credentials.cloudflare, and leave the environment variables unset.","hierarchy":{"lvl0":"Getting Started","lvl1":"Cloudflare Clef Provider Guide","lvl2":"One token, two providers","lvl3":""}},
5672
- {"objectID":"fee62c91a128411e33fcad60cf048405bd86ff0f4015189d992b70d34fe1b86f","title":"Measured on a real account, October 2026","url":"/docs/getting-started/providers/cloudflare-clef#measured-on-a-real-account-october-2026","content":"The Workers AI endpoint ignores text past about 2,048 tokens, far below\nCloudflare's documented 64K context (hosted service or model: unknown). Request-size refusals also changed between two measurement dates.\nThe original measurements were on 2026-10-03; the bounded follow-up campaign\nused 133 probe calls on 2026-10-04, with one request at a time.\n\nWhich model: on both clef-flash and clef, the follow-up still read the\nfact at the 2026-10-03 clef-flash lower bound for logs, number lists, digit\narrays and compact JSON, and did not read it about 2.5% further on. English prose and\nrandom CJK had already matched on both models. It also checked the question,\nid, option, score-level, PNG/JPEG/WebP, pixel and four/five-image boundaries on\nclef, and the four-image and image/jpg cases on both models. Natural-script\nprose was measured on clef; a reworked many-key object probe matched on both.\nTypeScript, minified JSON and synthetic Devanagari/emoji cuts remain 9B-only\nmeasurements. Historical latency, billing and burst figures retain their dates.","hierarchy":{"lvl0":"Getting Started","lvl1":"Cloudflare Clef Provider Guide","lvl2":"Measured on a real account, October 2026","lvl3":""}},
5673
+ {"objectID":"fee62c91a128411e33fcad60cf048405bd86ff0f4015189d992b70d34fe1b86f","title":"Measured on a real account, October 2026","url":"/docs/getting-started/providers/cloudflare-clef#measured-on-a-real-account-october-2026","content":"The Workers AI endpoint ignores text past about 2,048 tokens, far below\nCloudflare's documented 64K context (hosted service or model: unknown). Request-size refusals also changed between two measurement dates.\nThe original measurements were on 2026-10-03; the bounded follow-up campaign\nused 133 probe calls on 2026-10-04, with one request at a time.\n\nWhich model: on both clef-flash and clef, the follow-up still read the\nfact at the 2026-10-03 clef-flash lower bound for logs, number lists, digit\narrays and compact JSON, and did not read it 2.5% to 3.1% further on. English prose and\nrandom CJK had already matched on both models. It also checked the question\ncount, pixel and four/five-image boundaries on both models, the id, option,\nscore-level and PNG/JPEG/WebP boundaries on clef, and the image/jpg case on\nboth models. Natural-script\nprose was measured on clef; a reworked many-key object probe matched on both.\nTypeScript, minified JSON and synthetic Devanagari/emoji cuts remain 9B-only\nmeasurements. Historical latency, billing and burst figures retain their dates.","hierarchy":{"lvl0":"Getting Started","lvl1":"Cloudflare Clef Provider Guide","lvl2":"Measured on a real account, October 2026","lvl3":""}},
5674
+ {"objectID":"26bf07373276f11bf9e656e74cd4a5cbdeeed0e8b4bfa1c057f362b55a3ad959","title":"The state window changed on 2026-10-07","url":"/docs/getting-started/providers/cloudflare-clef#the-state-window-changed-on-2026-10-07","content":"The window described above no longer applies. On 2026-10-07 the Workers AI\nendpoint read the whole state. This section records what was measured; the\nnumbers above stay as the record of 2026-10-03 and 2026-10-04.\n\nMeasured with one request at a time between 07:24 and 08:12 UTC, with a fact\nplaced at the end of the state (the part a cut would drop) and the question \"what\ncolour does the text say the vault code is?\". A fact counts as read when the\nanswer's probability for its colour is at least 0.8.\n\n| State | Model | Characters | Input tokens billed | Fact read (probability) | Time |\n| --------------------------------- | ------------ | ---------- | ------------------- | ----------------------- | ------ |\n| Prose, fact at 55,000 | clef-flash | 60,032 | 10,555 | yes (0.980) | 0.8 s |\n| Prose, fact at 55,000 | clef | 60,032 | 10,555 | yes (0.996) | 2.0 s |\n| Prose, no fact (control) | clef-flash | 60,000 | 10,547 | no (0.297) | 1.1 s |\n| Prose, no fact (control) | clef | 60,000 | 10,547 | no (0.170) | 2.0 s |\n| Prose, fact at 200,000 | clef-flash | 240,032 | 41,755 | yes (0.978) | 3.0 s |\n| Prose, fact at the end | clef-flash | 300,031 | 52,154 | yes (0.984) | 4.9 s |\n| Prose, fact at the end | clef | 300,031 | 52,154 | yes (0.996) | 11.8 s |\n| Prose, fact at the end | clef-flash | 500,031 | 86,819 | yes (0.985) | 19.2 s |\n| JSON array of digits, fact at end | clef-flash | 115,031 | 115,153 | yes (0.986) | 11.3 s |\n| JSON array of digits, fact at end | clef-flash | 158,031 | 158,153 | yes (0.987) | 30.9 s |\n| JSON array of digits, fact at end |","hierarchy":{"lvl0":"Getting Started","lvl1":"Cloudflare Clef Provider Guide","lvl2":"The state window changed on 2026-10-07","lvl3":""}},
5673
5675
  {"objectID":"39c1f7ffec3b0df62b067ce9d778c3752d09cb8fdecce80b4e64028655048470","title":"What NeuroLink refuses before any request","url":"/docs/getting-started/providers/cloudflare-clef#what-neurolink-refuses-before-any-request","content":"| Refused | Limit | Error kind |\n| --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------- |\n| A state estimated over 1,500 tokens | digits 1 token each, punctuation 0.75, emoji 3, other non-ASCII text 1.5, letters about 4 characters a token | max_tokens_exceeded |\n| More than 64 questions in one decide() | 64 | max_tokens_exceeded |\n| A request body over 256,000 bytes | 256,000 | invalid_request |\n| More than 4 images, a video, or a format other than PNG, JPEG or WebP | | invalid_request |\n| A model name that is not a plain name, such as clef/../x | | invalid_request |\n| A missing token or account id, or a base URL that cannot work | | authentication or invalid_request |\n\nNeuroLink.tryDecide(), which every built-in feature calls, splits a question\nmap at 64 and runs up to four batches at once, so only a direct decide() meets\nthe 64-question refusal.\n\nWhy 1,500 and not 2,048.","hierarchy":{"lvl0":"Getting Started","lvl1":"Cloudflare Clef Provider Guide","lvl2":"What NeuroLink refuses before any request","lvl3":""}},
5674
- {"objectID":"bb0d1df2801529da652fbd15360879d9b2ccce53dfdf4d825a7a00f4e19d8d15","title":"What is not verified","url":"/docs/getting-started/providers/cloudflare-clef#what-is-not-verified","content":"The status Cloudflare returns for a token without Workers AI permission. No\n such token was available. A 403 is treated as an ordinary invalid_request,\n not authentication, so that if it does mean a missing permission, fixing it\n in the dashboard works at once, without restarting the process.\nAny 5xx. Cloudflare answered none during the probe, so the retry and\n classification of 500, 502, 503 and 504 rest on ordinary HTTP conventions.\nWhat happens to an account that has run out of credit.\nThe 27B TypeScript, minified-JSON and synthetic Devanagari/emoji cuts, and\n the image-byte ceiling after the observed request-size change; see the model\n coverage above.\nThe rate limit. Only a burst of 60 was tried.\nWhether Cloudflare's service is generally available or in beta.\nWhether the 2,048-token state window and the changing request-size limit belong\n to the hosted service or to the model itself. The open weights on Hugging Face\n were not run.\nWhether either limit changes. The live decide suite carries three canary cases\n (19.10, 19.10b and 19.11) that fail with an instruction to re-measure if it\n does; 19.11 checks both sides of the text-only request ceiling on clef-flash.","hierarchy":{"lvl0":"Getting Started","lvl1":"Cloudflare Clef Provider Guide","lvl2":"What is not verified","lvl3":""}},
5676
+ {"objectID":"bb0d1df2801529da652fbd15360879d9b2ccce53dfdf4d825a7a00f4e19d8d15","title":"What is not verified","url":"/docs/getting-started/providers/cloudflare-clef#what-is-not-verified","content":"The status Cloudflare returns for a token without Workers AI permission. No\n such token was available. A 403 is treated as an ordinary invalid_request,\n not authentication, so that if it does mean a missing permission, fixing it\n in the dashboard works at once, without restarting the process.\nAny 5xx other than one 529. Cloudflare answered a single server error, HTTP 529\n with code 5012 (\"Clef inference failed\"), to a 190,153-token state on clef on\n 2026-10-07; the retry and classification of 500, 502, 503 and 504 rest on\n ordinary HTTP conventions.\nWhat a Workers Paid account that has run out of credit gets. Only the Free plan's\n daily allocation running out was seen (HTTP 429, code 4006, 2026-10-05); it is\n not retried. Cloudflare documents a reset at 00:00 UTC, but this account was\n still refused at 02:38 and 04:12 UTC on 2026-10-06 and answered again at\n 07:24 UTC on 2026-10-07, so when the allowance returns here is not verified.\nThe 27B TypeScript, minified-JSON and synthetic Devanagari/emoji cuts; see the\n model coverage above.\nThe rate limit. Only a burst of 60 was tried.\nWhether Cloudflare's service is generally available or in beta.\nWhether the state window (about 2,048 tokens until 2026-10-04, none found by\n 2026-10-07) and the changing request-size limit belong to the hosted service or\n to the model itself. The open weights on Hugging Face\n were not run.\nWhether either limit changes again. The live decide suite carries three canary\n cases that fail with an instruction to re-measure: 19.10 and 19.10b send a\n prose state and a digit array just under NeuroLink's own limit, with a fact at\n the very end, to both models, and fail if the service stops reading below that\n limit; 19.11 checks both sides of the text-only request ceiling on clef-flash.\n None of them notices a service that reads more than the limit allows.","hierarchy":{"lvl0":"Getting Started","lvl1":"Cloudflare Clef Provider Guide","lvl2":"What is not verified","lvl3":""}},
5675
5677
  {"objectID":"4214184c06ad6cee88e38838f55c38c5a554a78434494b5d765a1c120eb0e339","title":"Latency and the timeout","url":"/docs/getting-started/providers/cloudflare-clef#latency-and-the-timeout","content":"On 2026-10-03, a small request answered in 0.3 to 1.0 s from a developer\nmachine; 64 questions took 1.1 s on clef-flash and 1.3 s on clef; the\nslowest of 60 requests sent at once took 2.2 s. On 2026-10-04, a\n64-question request with the same questions and a shorter state took 1.5 s on clef-flash and 2.3 s on clef. The default timeout is 5 s. Pass timeoutMs to change it for\none call.","hierarchy":{"lvl0":"Getting Started","lvl1":"Cloudflare Clef Provider Guide","lvl2":"Latency and the timeout","lvl3":""}},
5676
5678
  {"objectID":"c2d0b99e3c2760e14d8be1f81ba92c025ad96523cdeaa34dd002a748ae9658de","title":"Errors","url":"/docs/getting-started/providers/cloudflare-clef#errors","content":"Cloudflare answers with its own envelope, { \"success\": false, \"errors\": [{ \"code\",\n\"message\" }] }, and a refusal from the model nests a second envelope, with a\ntrailing request id, inside message. NeuroLink flattens both to one line and\ntakes the request id out of the text.\n\n| Status | Code | Seen for | Kind | Retried |\n| ------ | ----- | ----------------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------ |\n| 401 | 10000 | a token Cloudflare does not know | authentication | no; trips the breaker |\n| 403 | | never seen; a token without Workers AI permission may draw it | invalid_request | no; does not trip the breaker |\n| 400 | 5006 | no questions; an unknown question type | invalid_request | no |\n| 400 | 7000 | a model path that does not exist (\"No route for that URI\") | invalid_request | no |\n| 400 | 6003 | a body that is not JSON | invalid_request | no |\n| 422 | 5012 | a validation failure: 65 questions, a fifth image, an unknown field, an empty instruction | invalid_request | no |\n| 413 | 5021 | a request past the estimate above | max_tokens_exceeded | no |\n| 429 | 3040 | \"Capacity temporarily exceeded\"; no Retry-After","hierarchy":{"lvl0":"Getting Started","lvl1":"Cloudflare Clef Provider Guide","lvl2":"Errors","lvl3":""}},
5677
- {"objectID":"ce05a3d9d2ab15b8867c8e721fbfa0f8e1248520e2413765fa7d70bd835e3f85","title":"Troubleshooting","url":"/docs/getting-started/providers/cloudflare-clef#troubleshooting","content":"\"requires the account id\" — set CLOUDFLARE_ACCOUNT_ID or\n credentials.cloudflareClef.accountId.\n\"The state is ~N tokens; Cloudflare's … model reads at most 1500\" — shorten\n the state, or send only the part the question is about. Cloudflare would have\n cut the rest without telling you.\n\"No route for that URI\" — the model name or the base URL is wrong. Clef is\n served as clef and clef-flash, and the base URL must end in /client/v4.\nA 429 \"Capacity temporarily exceeded\" — retried for you; if it keeps\n happening, send fewer requests at once.\nAn image is refused as \"The request is N bytes; Cloudflare accepts at most\n 256000\" — Cloudflare counts the base64 text of the image, so NeuroLink\n refuses it locally under the retained conservative cap. Resize or compress it\n to well under 190 KB; a 195 KB PNG, which Cloudflare accepted, is about 260,000\n characters in base64 and is refused here.\ndecide() uses Clef although you never chose it — you have the Workers AI\n token and account id set and no other decision provider; see\n When NeuroLink uses it.","hierarchy":{"lvl0":"Getting Started","lvl1":"Cloudflare Clef Provider Guide","lvl2":"Troubleshooting","lvl3":""}},
5679
+ {"objectID":"ce05a3d9d2ab15b8867c8e721fbfa0f8e1248520e2413765fa7d70bd835e3f85","title":"Troubleshooting","url":"/docs/getting-started/providers/cloudflare-clef#troubleshooting","content":"\"requires the account id\" — set CLOUDFLARE_ACCOUNT_ID or\n credentials.cloudflareClef.accountId.\n\"The state is ~N tokens; Cloudflare's … model reads at most 1500\" — shorten\n the state, or send only the part the question is about. Cloudflare would have\n cut the rest without telling you.\n\"No route for that URI\" — the model name or the base URL is wrong. Clef is\n served as clef and clef-flash, and the base URL must end in /client/v4.\nA 429 \"Capacity temporarily exceeded\" — retried for you; if it keeps\n happening, send fewer requests at once.\nA 429 \"you have used up your daily free allocation of 10,000 neurons\" — the\n Free plan's allowance for the day is gone. It is not retried, because nothing\n changes until the allowance returns (Cloudflare documents a reset at 00:00 UTC; on\n this account it came back later, see \"What is not verified\"); upgrade to Workers Paid or wait.\n Built-in features that use Clef as their default fall back as on any failure.\nAn image is refused as \"The request is N bytes; Cloudflare accepts at most\n 256000\" — Cloudflare counts the base64 text of the image, so NeuroLink\n refuses it locally under the retained conservative cap. Resize or compress it\n to well under 190 KB; a 195 KB PNG, which Cloudflare accepted, is about 260,000\n characters in base64 and is refused here.\ndecide() uses Clef although you never chose it — you have the Workers AI\n token and account id set and no other decision provider; see\n When NeuroLink uses it.","hierarchy":{"lvl0":"Getting Started","lvl1":"Cloudflare Clef Provider Guide","lvl2":"Troubleshooting","lvl3":""}},
5678
5680
  {"objectID":"64d2af754e23d6f77f9ba5991174048f9dc4e8434d0f9a633527785feff8158e","title":"See also","url":"/docs/getting-started/providers/cloudflare-clef#see-also","content":"The decide inference type\nTypeSafe (Jev) Provider Guide\nLaya Provider Guide\nXOR Provider Guide\nPerplexity Decisions Provider Guide\nCloudflare Workers AI text provider\nClef on Workers AI\nIntroducing Clef: our open-source decision models, and new RL fine-tuning platform (Cloudflare Blog)","hierarchy":{"lvl0":"Getting Started","lvl1":"Cloudflare Clef Provider Guide","lvl2":"See also","lvl3":""}},
5679
5681
  {"objectID":"3803b4ecde578f946b8a4fe5139e3ee640d53281541c50578e8a5d47847d5157","title":"Cloudflare Workers AI Provider Guide","url":"/docs/getting-started/providers/cloudflare","content":"Cloudflare Workers AI Provider Guide\n\nOpen-model inference at the edge via Cloudflare Workers AI\n\nOverview\n\nCloudflare Workers AI\nserves Meta Llama, Mistral, and other open models from Cloudflare's\nglobal GPU cluster. NeuroLink talks to the OpenAI-compatible endpoint.\n\nKey Facts\nProtocol: OpenAI-compatible (/v1/chat/completions)\nDefault base URL: https://api.cloudflare.com/client/v4/accounts/{accountId}/ai/v1\nDefault model: @cf/meta/llama-3.3-70b-instruct-fp8-fast\nStreaming: Yes\nTool calling: Limited (model-dependent)\n\nQuick Start\nGet Credentials\n\nYou need both:\nA Cloudflare Account ID (Cloudflare dashboard → right sidebar)\nA Workers AI API token with the Workers AI Read & Write\n permission (Profile → API Tokens → Create Token)\nConfigure\nGenerate\n\nSupported Models (sample)\n\n| Model ID | Notes |\n| ------------------------------------------ | -------------- |\n| @cf/meta/llama-3.3-70b-instruct-fp8-fast | Default |\n| @cf/meta/llama-3.1-70b-instruct | Llama 3.1 70B |\n| @cf/meta/llama-3.1-8b-instruct | Fast tier |\n| @cf/meta/llama-3.2-11b-vision-instruct | Vision-capable |\n\nBrowse: https://developers.cloudflare.com/workers-ai/models\n\nCLI Usage\n\nProvider Aliases\n\n| Alias | Example |\n| ------------ | ----------------------- |\n| cloudflare | --provider cloudflare |\n| cf | --provider cf |\n\nConfiguration Reference\n\n| Environment Variable | Required | Default |\n| ----------------------- | -------- | ------------------------------------------ |\n| CLOUDFLARE_ACCOUNT_ID | Yes | — |\n| CLOUDFLARE_API_KEY | Yes | — |\n| CLOUDFLARE_MODEL | No | @cf/meta/llama-3.3-70b-instruct-fp8-fast |\n\nAlso configures decisions\n\nCLOUDFLARE_API_KEY and CLOUDFLARE_ACCOUNT_ID also configure a separate\nprovider, the Cloudflare Clef provider (cloudflare-clef),\nwhich serves decide() and emits no text. It is the last decision provider\nNeuroLink falls back to: built-in features that call decide() use the first one\nconfigured, in the order TypeSafe, Laya, XOR, Perplexity, then Clef. So a host\nthat set these two variables only for this text provider, and has no other\ndecision provider configured, has Clef as its default decision provider, and no\nswitch turns that off while they are set.\n\ncredentials.cloudflare does not configure decide; Clef reads its own\nslice, credentials.cloudflareClef. The text provider itself is unchanged: it\nstill serves generate() and stream() with the same variables, models and base\nURL. See\nOne token, two providers.\n\nSee Also\nCloudflare Clef Provider — typed decide() judgments on the same token and account id\nTogether AI Provider\nFireworks Provider","hierarchy":{"lvl0":"Getting Started","lvl1":"Cloudflare Workers AI Provider Guide","lvl2":"","lvl3":""}},
5680
5682
  {"objectID":"aafa1a6f2adf2bacc5661cf9ccb309d1e32e300645f037c35a98217b31eb15df","title":"Cloudflare Workers AI Provider Guide","url":"/docs/getting-started/providers/cloudflare#cloudflare-workers-ai-provider-guide","content":"Open-model inference at the edge via Cloudflare Workers AI","hierarchy":{"lvl0":"Getting Started","lvl1":"Cloudflare Workers AI Provider Guide","lvl2":"Cloudflare Workers AI Provider Guide","lvl3":""}},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/neurolink",
3
- "version": "12.49.0",
3
+ "version": "12.49.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": {