@juspay/neurolink 12.55.0 → 12.55.1
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.
- package/CHANGELOG.md +3 -3
- package/dist/browser/neurolink.min.js +5 -5
- package/dist/providers/catalog/loader.d.ts +1 -0
- package/dist/providers/catalog/loader.js +7 -0
- package/dist/providers/catalog/provider-catalog.schema.json +8 -0
- package/dist/providers/catalog/schema.d.ts +2 -0
- package/dist/providers/catalog/schema.js +2 -0
- package/dist/providers/catalog/xiaomi-mimo.json +4 -0
- package/dist/providers/configuredOpenAICompat.d.ts +5 -0
- package/dist/providers/configuredOpenAICompat.js +19 -1
- package/dist/providers/openaiChatCompletionsBase.d.ts +8 -4
- package/dist/providers/openaiChatCompletionsBase.js +18 -11
- package/dist/types/providerCatalog.d.ts +6 -0
- package/dist/types/providers.d.ts +5 -0
- package/docs-site/static/search-index.json +3 -3
- package/package.json +2 -1
|
@@ -6,4 +6,5 @@ export declare function freezeCatalogCopy<T>(value: T): T;
|
|
|
6
6
|
export declare function getCatalogJsonEntries(): readonly ProviderCatalogJson[];
|
|
7
7
|
/** The `decide` entries, copied and frozen exactly as getCatalogJsonEntries() does. */
|
|
8
8
|
export declare function getDecideCatalogEntries(): readonly DecideCatalogJson[];
|
|
9
|
+
/** Build runtime provider entries with only the quirks each catalog opts into. */
|
|
9
10
|
export declare function buildCatalogEntries(): OpenAICompatCatalogEntry[];
|
|
@@ -118,6 +118,7 @@ export function getCatalogJsonEntries() {
|
|
|
118
118
|
export function getDecideCatalogEntries() {
|
|
119
119
|
return freezeCatalogCopy(DECIDE_CATALOG_JSON_ENTRIES);
|
|
120
120
|
}
|
|
121
|
+
/** Build runtime provider entries with only the quirks each catalog opts into. */
|
|
121
122
|
export function buildCatalogEntries() {
|
|
122
123
|
return CATALOG_JSON_ENTRIES.map((entry) => {
|
|
123
124
|
// Only models whose entry sets `tools` explicitly contribute a row —
|
|
@@ -171,6 +172,12 @@ export function buildCatalogEntries() {
|
|
|
171
172
|
base.baseURLEnvVar = catalogEnvVar(entry, "baseURL");
|
|
172
173
|
base.defaultBaseURL = entry.wire.baseURL;
|
|
173
174
|
}
|
|
175
|
+
if (entry.quirks?.maxTokensField) {
|
|
176
|
+
base.maxTokensField = entry.quirks.maxTokensField;
|
|
177
|
+
}
|
|
178
|
+
if (entry.quirks?.omitStreamOptions !== undefined) {
|
|
179
|
+
base.omitStreamOptions = entry.quirks.omitStreamOptions;
|
|
180
|
+
}
|
|
174
181
|
if (entry.quirks?.messageContentFormat) {
|
|
175
182
|
base.messageContentFormat = entry.quirks.messageContentFormat;
|
|
176
183
|
}
|
|
@@ -416,6 +416,14 @@
|
|
|
416
416
|
"type": "object",
|
|
417
417
|
"additionalProperties": false,
|
|
418
418
|
"properties": {
|
|
419
|
+
"maxTokensField": {
|
|
420
|
+
"const": "max_completion_tokens",
|
|
421
|
+
"description": "Send the caller's fitted maxTokens budget as max_completion_tokens and omit max_tokens. Omitted preserves the ordinary field."
|
|
422
|
+
},
|
|
423
|
+
"omitStreamOptions": {
|
|
424
|
+
"type": "boolean",
|
|
425
|
+
"description": "Omit stream_options for endpoints that do not document that extension. Does not discard usage returned without requesting it."
|
|
426
|
+
},
|
|
419
427
|
"timeoutErrorClass": {
|
|
420
428
|
"const": "provider"
|
|
421
429
|
},
|
|
@@ -77,6 +77,8 @@ export declare const providerCatalogJsonSchema: z.ZodObject<{
|
|
|
77
77
|
message: z.ZodString;
|
|
78
78
|
}, z.core.$strict>>;
|
|
79
79
|
quirks: z.ZodOptional<z.ZodObject<{
|
|
80
|
+
maxTokensField: z.ZodOptional<z.ZodLiteral<"max_completion_tokens">>;
|
|
81
|
+
omitStreamOptions: z.ZodOptional<z.ZodBoolean>;
|
|
80
82
|
timeoutErrorClass: z.ZodOptional<z.ZodLiteral<"provider">>;
|
|
81
83
|
messageContentFormat: z.ZodOptional<z.ZodLiteral<"string">>;
|
|
82
84
|
registryDefaultIgnoresModelEnvVar: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -158,6 +158,8 @@ const catalogErrorRuleJsonSchema = z
|
|
|
158
158
|
}
|
|
159
159
|
});
|
|
160
160
|
const catalogQuirksSchema = z.strictObject({
|
|
161
|
+
maxTokensField: z.literal("max_completion_tokens").optional(),
|
|
162
|
+
omitStreamOptions: z.boolean().optional(),
|
|
161
163
|
timeoutErrorClass: z.literal("provider").optional(),
|
|
162
164
|
messageContentFormat: z.literal("string").optional(),
|
|
163
165
|
registryDefaultIgnoresModelEnvVar: z.boolean().optional(),
|
|
@@ -89,6 +89,11 @@ export declare class ConfiguredOpenAICompatProvider extends OpenAIChatCompletion
|
|
|
89
89
|
* so a stale flag costs one request rather than the turn.
|
|
90
90
|
*/
|
|
91
91
|
protected suppressResponseFormatWithTools(): boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Apply catalog-scoped budget, streaming and message dialects to the final
|
|
94
|
+
* request body. Reapplying these adjustments during a retry preserves the
|
|
95
|
+
* same endpoint contract without changing an already normalized budget.
|
|
96
|
+
*/
|
|
92
97
|
protected adjustRequestBody(body: OpenAICompatChatRequest, modelId: string): OpenAICompatChatRequest;
|
|
93
98
|
protected adjustResponseFormat(rf: OpenAICompatResponseFormat | undefined, modelId: string): OpenAICompatResponseFormat | undefined;
|
|
94
99
|
protected replayReasoningContent(): boolean;
|
|
@@ -164,8 +164,26 @@ export class ConfiguredOpenAICompatProvider extends OpenAIChatCompletionsProvide
|
|
|
164
164
|
suppressResponseFormatWithTools() {
|
|
165
165
|
return this.entry.supportsStructuredOutputWithTools !== true;
|
|
166
166
|
}
|
|
167
|
+
/**
|
|
168
|
+
* Apply catalog-scoped budget, streaming and message dialects to the final
|
|
169
|
+
* request body. Reapplying these adjustments during a retry preserves the
|
|
170
|
+
* same endpoint contract without changing an already normalized budget.
|
|
171
|
+
*/
|
|
167
172
|
adjustRequestBody(body, modelId) {
|
|
168
|
-
|
|
173
|
+
let adjusted = super.adjustRequestBody(body, modelId);
|
|
174
|
+
if (this.entry.maxTokensField === "max_completion_tokens") {
|
|
175
|
+
const { max_tokens, ...withoutLegacyBudget } = adjusted;
|
|
176
|
+
adjusted = {
|
|
177
|
+
...withoutLegacyBudget,
|
|
178
|
+
...(max_tokens === undefined
|
|
179
|
+
? {}
|
|
180
|
+
: { max_completion_tokens: max_tokens }),
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
if (this.entry.omitStreamOptions === true) {
|
|
184
|
+
const { stream_options: _streamOptions, ...withoutStreamOptions } = adjusted;
|
|
185
|
+
adjusted = withoutStreamOptions;
|
|
186
|
+
}
|
|
169
187
|
if (this.entry.rejectRequiredToolChoice === true &&
|
|
170
188
|
adjusted.tool_choice === "required" &&
|
|
171
189
|
Array.isArray(adjusted.tools) &&
|
|
@@ -158,12 +158,16 @@ export declare abstract class OpenAIChatCompletionsProvider extends BaseProvider
|
|
|
158
158
|
* uses the backend's own number — self-healing even when a discovery
|
|
159
159
|
* endpoint (`/model/info`) is absent or unauthorized;
|
|
160
160
|
* - when the error also states the real input size (vllm/LiteLLM
|
|
161
|
-
* phrasing)
|
|
162
|
-
*
|
|
161
|
+
* phrasing), its output budget is re-fit to `window − input − margin`
|
|
162
|
+
* and the request retried once. An explicit `max_completion_tokens`
|
|
163
|
+
* takes precedence over legacy `max_tokens`; a server-reported output
|
|
164
|
+
* budget is used only when the request carried neither field.
|
|
163
165
|
*
|
|
164
166
|
* Returns undefined when the error is not an overflow, or when no smaller
|
|
165
|
-
*
|
|
166
|
-
* original error then propagates unchanged.
|
|
167
|
+
* output budget can make the request fit (input alone too large) — the
|
|
168
|
+
* original error then propagates unchanged. The retry never increases an
|
|
169
|
+
* explicit caller budget and is normalized through the provider's wire
|
|
170
|
+
* adjustment hook, including when the initial budget was server-defaulted.
|
|
167
171
|
*/
|
|
168
172
|
private correctBodyAfterContextOverflow;
|
|
169
173
|
/**
|
|
@@ -376,12 +376,16 @@ export class OpenAIChatCompletionsProvider extends BaseProvider {
|
|
|
376
376
|
* uses the backend's own number — self-healing even when a discovery
|
|
377
377
|
* endpoint (`/model/info`) is absent or unauthorized;
|
|
378
378
|
* - when the error also states the real input size (vllm/LiteLLM
|
|
379
|
-
* phrasing)
|
|
380
|
-
*
|
|
379
|
+
* phrasing), its output budget is re-fit to `window − input − margin`
|
|
380
|
+
* and the request retried once. An explicit `max_completion_tokens`
|
|
381
|
+
* takes precedence over legacy `max_tokens`; a server-reported output
|
|
382
|
+
* budget is used only when the request carried neither field.
|
|
381
383
|
*
|
|
382
384
|
* Returns undefined when the error is not an overflow, or when no smaller
|
|
383
|
-
*
|
|
384
|
-
* original error then propagates unchanged.
|
|
385
|
+
* output budget can make the request fit (input alone too large) — the
|
|
386
|
+
* original error then propagates unchanged. The retry never increases an
|
|
387
|
+
* explicit caller budget and is normalized through the provider's wire
|
|
388
|
+
* adjustment hook, including when the initial budget was server-defaulted.
|
|
385
389
|
*/
|
|
386
390
|
correctBodyAfterContextOverflow(body, error) {
|
|
387
391
|
if (!isContextOverflowError(error)) {
|
|
@@ -393,11 +397,13 @@ export class OpenAIChatCompletionsProvider extends BaseProvider {
|
|
|
393
397
|
return undefined;
|
|
394
398
|
}
|
|
395
399
|
registerRuntimeContextWindow(this.providerName, body.model, details.budgetTokens);
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
400
|
+
const budgetField = typeof body.max_completion_tokens === "number"
|
|
401
|
+
? "max_completion_tokens"
|
|
402
|
+
: "max_tokens";
|
|
403
|
+
// A parsed output count is only a fallback for server-defaulted output;
|
|
404
|
+
// it must not override an explicit cap in either supported dialect.
|
|
405
|
+
const previousMaxTokens = typeof body[budgetField] === "number"
|
|
406
|
+
? body[budgetField]
|
|
401
407
|
: details.requestedOutputTokens;
|
|
402
408
|
if (previousMaxTokens === undefined || details.actualTokens <= 0) {
|
|
403
409
|
return undefined;
|
|
@@ -406,13 +412,14 @@ export class OpenAIChatCompletionsProvider extends BaseProvider {
|
|
|
406
412
|
if (refit <= 0 || refit >= previousMaxTokens) {
|
|
407
413
|
return undefined;
|
|
408
414
|
}
|
|
409
|
-
logger.warn(`${this.providerName}: ${body.model} rejected the request as over-window — retrying once with
|
|
415
|
+
logger.warn(`${this.providerName}: ${body.model} rejected the request as over-window — retrying once with ${budgetField} re-fit from the provider's own numbers`, {
|
|
410
416
|
window: details.budgetTokens,
|
|
411
417
|
inputTokens: details.actualTokens,
|
|
412
418
|
previousMaxTokens,
|
|
413
419
|
refitMaxTokens: refit,
|
|
414
420
|
});
|
|
415
|
-
|
|
421
|
+
const { max_tokens: _legacyBudget, max_completion_tokens: _completionBudget, ...withoutOutputBudget } = body;
|
|
422
|
+
return this.adjustRequestBody({ ...withoutOutputBudget, [budgetField]: refit }, body.model);
|
|
416
423
|
}
|
|
417
424
|
/**
|
|
418
425
|
* Hook called once at the start of every `executeStream` invocation.
|
|
@@ -74,6 +74,12 @@ export type CatalogErrorRuleJson = {
|
|
|
74
74
|
message: string;
|
|
75
75
|
};
|
|
76
76
|
export type CatalogQuirks = {
|
|
77
|
+
/** Send the caller's fitted maxTokens budget as max_completion_tokens and
|
|
78
|
+
* omit max_tokens. Omitted preserves the ordinary OpenAI-compatible field. */
|
|
79
|
+
maxTokensField?: "max_completion_tokens";
|
|
80
|
+
/** Omit stream_options where the endpoint does not document that extension.
|
|
81
|
+
* Does not discard usage that the endpoint returns without requesting it. */
|
|
82
|
+
omitStreamOptions?: boolean;
|
|
77
83
|
timeoutErrorClass?: "provider";
|
|
78
84
|
/** Vendor speaks OpenAI for chat but restricts how message content is
|
|
79
85
|
* encoded. "string": `messages[].content` must be a plain string —
|
|
@@ -1121,6 +1121,11 @@ export type OpenAICompatCatalogEntry = {
|
|
|
1121
1121
|
* Task 4, so nothing actually mutates it at runtime.
|
|
1122
1122
|
*/
|
|
1123
1123
|
errorRules: ProviderErrorRule[];
|
|
1124
|
+
/** See CatalogQuirks.maxTokensField. Preserve the fitted output budget while
|
|
1125
|
+
* changing only its wire name; omitted keeps max_tokens. */
|
|
1126
|
+
maxTokensField?: "max_completion_tokens";
|
|
1127
|
+
/** See CatalogQuirks.omitStreamOptions. Omitted preserves stream usage options. */
|
|
1128
|
+
omitStreamOptions?: boolean;
|
|
1124
1129
|
/**
|
|
1125
1130
|
* Optional override for the Error subclass a TimeoutError should produce
|
|
1126
1131
|
* for this entry. classifyProviderError() hard-codes
|
|
@@ -9793,13 +9793,13 @@
|
|
|
9793
9793
|
{"objectID":"c44a6f29a351e862c3dcea298b1cbc52129fe85426e9e2e861169977e59d80e8","title":"Evidence caveats","url":"/docs/provider-integration/pilots/runinfra-source-pilot#evidence-caveats","content":"Context window 262144 and maximum generated output 262144 are both stated on\n the vendor's model page for this exact model. The chat-completions reference\n says per-request output is capped at the model's remaining context (window\n minus prompt) and that oversized values are clamped, so 262144 output is a\n ceiling, not capacity beside a full prompt. This SDK path does not send either\n ceiling on the wire; the owned endpoint cannot observe them.\nAvailability is a runtime field. The model page said Available on\n 2026-10-12; the vendor changelog says the model was listed ahead of its public\n opening and a paused model answers 503 hostedmodelpaused. No API call was\n made, so availability to any account is unverified.\nBilling is usage-priced (USD per token) with prepaid $1 credits, a $5 minimum\n top-up and a one-time $1 signup credit per account. Prices and credit terms\n were read from vendor pages and not tried on an account; they may change.\nThe vendor documents a reasoning_effort default for this model under JSON\n response formats, and says usage.outputTokenDetails.reasoningTokens reports\n 0 even when the model reasoned. Thinking, tools, structured output and vision\n are declared off here as a scope limit; none was probed, and whether streamed\n output carries reasoning text was never observed.\nThe chat-completions reference says this model reasons by default, that\n reasoning tokens count toward max_tokens before the answer, and that a\n smaller budget can be spent entirely on reasoning and return a completion\n whose content is empty. The suite's max_tokens: 32 is a wire marker for\n the owned endpoint, not a recommendation, and the empty-content behavior was\n not observed.","hierarchy":{"lvl0":"Provider Integration","lvl1":"RunInfra text and streaming source pilot","lvl2":"Evidence caveats","lvl3":""}},
|
|
9794
9794
|
{"objectID":"83c82bf158f29ba1c9e527fe1e693bdc703cdd750f10c3e7380b6d7ae2f9777c","title":"Local public contract","url":"/docs/provider-integration/pilots/runinfra-source-pilot#local-public-contract","content":"test/continuous-test-suite-runinfra-pilot.ts runs twelve cases through the\nbuilt public SDK and built CLI, with optional --package-root support for a\nlater installed consumer:\n\n| Cases | Count | Required observation |\n| ---------------------------------------------- | ----: | ------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| SDK/CLI generate/stream default | 4 | Actual catalog default, /v1/chat/completions, Bearer header, unique user prompt, max_tokens: 32, stream mode, no tools/tool choice, answer |\n| SDK/CLI generate/stream invalid explicit model | 4 | All wire preconditions pass before HTTP 400 rejection; no fallback or successful reply |\n| Key variables | 4 | RUNINFRA_API_KEY alone reaches the wire (SDK and CLI), RUNINFRA_GATEWAY_KEY wins when both are set, and no key refuses before the wire and names it |\n\nThe fixture strips real credentials before imports, uses temporary homes and\npoints the provider at an owned random-port listener. Public MODEL_CONFIG_URL\nuses that same listener's HEAD /health and GET /api/v1/models; a\nschema-valid empty registry keeps the provider's actual catalog default in\ncontrol. The listener is the only server involved: no vendor host is contacted.","hierarchy":{"lvl0":"Provider Integration","lvl1":"RunInfra text and streaming source pilot","lvl2":"Local public contract","lvl3":""}},
|
|
9795
9795
|
{"objectID":"d10202fe001113e5e0487518b154b04756ccb490eeb5a1800a8262aecfcf4936","title":"Provenance and remaining gates","url":"/docs/provider-integration/pilots/runinfra-source-pilot#provenance-and-remaining-gates","content":"The legacy evidence.rosterVerified slot carries the explicit\nVENDOR_DOCS_ONLY_NOT_ROSTER_VERIFIED marker and evidence.billingProbe\ncarries PUBLIC_DOCS_ONLY_ACCOUNT_NOT_TESTED; there is no HTTP status or auth\nprobe, and liveMatrix is null. evidence.addedInPR is the introduction pull\nrequest URL (https://github.com/juspay/neurolink/pull/1983), set after the pull\nrequest existed; it was PENDING_PR while the work was local. Source-stage admission does not certify current account or API\navailability.\n\nStill pending and separate: an authenticated GET /v1/models roster (the\nvendor's chat-completions reference says a temporarily paused model is\nreported there), a funded-account\nlive matrix, installed-consumer acceptance and any delivery claim.","hierarchy":{"lvl0":"Provider Integration","lvl1":"RunInfra text and streaming source pilot","lvl2":"Provenance and remaining gates","lvl3":""}},
|
|
9796
|
-
{"objectID":"a2a1b3f3eace26df9887f72342446b632c131c811f5b8d9a34eea9f58c1c1ae8","title":"Xiaomi MiMo text and streaming pilot","url":"/docs/provider-integration/pilots/xiaomi-mimo-source-pilot","content":"Xiaomi MiMo text and streaming pilot\n\nThis local source pilot selects Xiaomi MiMo's usage-priced mimo-v2.6-flash\nmodel through https://api.xiaomimimo.com/v1/chat/completions. Its declared\nscope is text generation and streaming. Source preparation, public contract\nacceptance, installed-package acceptance, current account/API availability and\ndelivery are separate gates. This draft gives no live, delivered-provider or\nprovider-target credit.\n\nExact source facts\n\nAll pages below are on the vendor's own documentation host, mimo.mi.com, and\nwere retrieved on 2026-10-10 (hashes at the end).\nContext and output integers. The model table (model.md) shows only the\n rounded labels 1M and 128K, so nothing was expanded from it. The integers\n come from two vendor-authored client configurations that bind them to the\n exact id mimo-v2.6-flash: the OpenClaw guide (\"contextWindow\": 1048576,\n \"maxTokens\": 131072) and the OpenCode guide (\"limit\": { \"context\": 1048576,\n\"output\": 131072 }). Both name https://api.xiaomimimo.com/v1 as the\n pay-as-you-go base URL. The two pages use different client schemas and agree.\n The API reference independently gives [1, 131072] as the required range of\n max_completion_tokens and a default of 131072 for mimo-v2.6-flash; that\n parameter covers visible plus reasoning tokens. No first-party prose or spec\n table states the context integer; the OpenClaw and OpenCode snippets are the\n only bindings, and 1048576 equals 1024 * 1024.\nRoute and auth. The API reference documents\n https://api.xiaomimimo.com/v1/chat/completions and two alternative headers,\n api-key: $MIMO_API_KEY and Authorization: Bearer $MIMO_API_KEY. This entry\n uses the Bearer form.\nLifecycle. mimo-v2.6-flash is current and is the named replacement for\n the retiring mimo-v2.5; it is not itself on a retirement schedule. The\n deprecation page gives mimo-v2.5 and mimo-v2.5-pro a 10:00 (UTC+8)\n switch on 2026-10-14 in its table and 18:00 (UTC+8) in a note on the same page.\n The discrepancy is preserved here; no exact switch instant is certified.\n\nBilling\n\nThe API is usage-priced: the pay-as-you-go page says it \"consumes the account\nbalance based on the actual Token usage\". The promotions page describes bonus\ncredit, obtained through Refer & Earn or new-user registration, that \"can be\nused to offset pay-as-you-go API usage\" and is \"currently valid for 40 days\".\nIt also says eligibility, credit amounts and payout rules vary by campaign. The\ncatalog therefore uses promotional-credit, following the\nNAVER CLOVA Studio profile (src/lib/providers/catalog/naver-clova-studio.json).\nThis is not a free tier. Whether a payment method or identity verification is\nrequired to obtain a working key was not established for the real-time API, the\ncredit amount and eligibility were not checked on an account, and prices are\nnot recorded (the pay-as-you-go page lists CNY and USD and they were not\nconverted).\n\nScope that is deliberately not declared\n\nThe capability booleans limit the pilot's declared scope; false is not\nevidence that the vendor lacks a feature. Tools, vision, structured output and\nSDK thinking controls are not declared because none has been probed. The\ndeprecation page notes that in thinking mode mimo-v2.6-flash ignores custom\ntemperature and top_p, so a thinking mode exists; this entry exposes no\ncontrol for it. Token Plan keys and base URLs are a separate subscription\nproduct and are out of scope.\n\nKnown gaps the local contract cannot close\nOutput-budget field name. The vendor's request reference lists only\n max_completion_tokens. The
|
|
9796
|
+
{"objectID":"a2a1b3f3eace26df9887f72342446b632c131c811f5b8d9a34eea9f58c1c1ae8","title":"Xiaomi MiMo text and streaming pilot","url":"/docs/provider-integration/pilots/xiaomi-mimo-source-pilot","content":"Xiaomi MiMo text and streaming pilot\n\nThis local source pilot selects Xiaomi MiMo's usage-priced mimo-v2.6-flash\nmodel through https://api.xiaomimimo.com/v1/chat/completions. Its declared\nscope is text generation and streaming. Source preparation, public contract\nacceptance, installed-package acceptance, current account/API availability and\ndelivery are separate gates. This draft gives no live, delivered-provider or\nprovider-target credit.\n\nExact source facts\n\nAll pages below are on the vendor's own documentation host, mimo.mi.com, and\nwere retrieved on 2026-10-10 (hashes at the end).\nContext and output integers. The model table (model.md) shows only the\n rounded labels 1M and 128K, so nothing was expanded from it. The integers\n come from two vendor-authored client configurations that bind them to the\n exact id mimo-v2.6-flash: the OpenClaw guide (\"contextWindow\": 1048576,\n \"maxTokens\": 131072) and the OpenCode guide (\"limit\": { \"context\": 1048576,\n\"output\": 131072 }). Both name https://api.xiaomimimo.com/v1 as the\n pay-as-you-go base URL. The two pages use different client schemas and agree.\n The API reference independently gives [1, 131072] as the required range of\n max_completion_tokens and a default of 131072 for mimo-v2.6-flash; that\n parameter covers visible plus reasoning tokens. No first-party prose or spec\n table states the context integer; the OpenClaw and OpenCode snippets are the\n only bindings, and 1048576 equals 1024 * 1024.\nRoute and auth. The API reference documents\n https://api.xiaomimimo.com/v1/chat/completions and two alternative headers,\n api-key: $MIMO_API_KEY and Authorization: Bearer $MIMO_API_KEY. This entry\n uses the Bearer form.\nLifecycle. mimo-v2.6-flash is current and is the named replacement for\n the retiring mimo-v2.5; it is not itself on a retirement schedule. The\n deprecation page gives mimo-v2.5 and mimo-v2.5-pro a 10:00 (UTC+8)\n switch on 2026-10-14 in its table and 18:00 (UTC+8) in a note on the same page.\n The discrepancy is preserved here; no exact switch instant is certified.\n\nBilling\n\nThe API is usage-priced: the pay-as-you-go page says it \"consumes the account\nbalance based on the actual Token usage\". The promotions page describes bonus\ncredit, obtained through Refer & Earn or new-user registration, that \"can be\nused to offset pay-as-you-go API usage\" and is \"currently valid for 40 days\".\nIt also says eligibility, credit amounts and payout rules vary by campaign. The\ncatalog therefore uses promotional-credit, following the\nNAVER CLOVA Studio profile (src/lib/providers/catalog/naver-clova-studio.json).\nThis is not a free tier. Whether a payment method or identity verification is\nrequired to obtain a working key was not established for the real-time API, the\ncredit amount and eligibility were not checked on an account, and prices are\nnot recorded (the pay-as-you-go page lists CNY and USD and they were not\nconverted).\n\nScope that is deliberately not declared\n\nThe capability booleans limit the pilot's declared scope; false is not\nevidence that the vendor lacks a feature. Tools, vision, structured output and\nSDK thinking controls are not declared because none has been probed. The\ndeprecation page notes that in thinking mode mimo-v2.6-flash ignores custom\ntemperature and top_p, so a thinking mode exists; this entry exposes no\ncontrol for it. Token Plan keys and base URLs are a separate subscription\nproduct and are out of scope.\n\nKnown gaps the local contract cannot close\nOutput-budget field name. The vendor's request reference lists only\n max_completion_tokens. The profile's quirks.maxTokensField maps the\n caller's fitted maxTokens budget to that field and omits max_tokens on\n generate and stream requests. An owned endpoint refuses the obsolete field\n and requires the exact requested budget before answering. This proves the\n emitted local wire contract; actual vendor acceptance and enforcement remain\n unverified. The parameter includes visible plus reasoning tokens.\nStreaming usage option. The vendor's reference documents stream but\n not stream_options. The profile's quirks.omitStreamOptions therefore omits\n that extension, preserving ordinary SSE streaming. Returned usage is still\n consumed if the vendor supplies it; no streaming usage completeness is claimed.\nEnvironment variable. The vendor's own examples name MIMO_API_KEY. The\n catalog's derived primary variable is XIAOMI_MIMO_API_KEY, and MIMO_API_KEY\n is read as a fallback through wire.apiKeyFallbackEnvVars, the mechanism the\n Sakana AI entry also uses. Removing the fallback is a one-line change if the\n maintainers prefer the pure convention.\nCeilings are source-bound only. The shared wire builder fits the output\n budget only to runtime-discovered ceilings, so the catalog's contextWindow and\n maxOutputTokens never appear on the wire, and no public CLI command or SDK\n export was found that reads them back. The owned endpoint cannot observe\n them; they rest on the cited source bindings ","hierarchy":{"lvl0":"Provider Integration","lvl1":"Xiaomi MiMo text and streaming pilot","lvl2":"","lvl3":""}},
|
|
9797
9797
|
{"objectID":"e6f0fe17d0287ca08aa0b72ec5e47ce773e8c8baf82de0948002899e1fec6fe6","title":"Xiaomi MiMo text and streaming pilot","url":"/docs/provider-integration/pilots/xiaomi-mimo-source-pilot#xiaomi-mimo-text-and-streaming-pilot","content":"This local source pilot selects Xiaomi MiMo's usage-priced mimo-v2.6-flash\nmodel through https://api.xiaomimimo.com/v1/chat/completions. Its declared\nscope is text generation and streaming. Source preparation, public contract\nacceptance, installed-package acceptance, current account/API availability and\ndelivery are separate gates. This draft gives no live, delivered-provider or\nprovider-target credit.","hierarchy":{"lvl0":"Provider Integration","lvl1":"Xiaomi MiMo text and streaming pilot","lvl2":"Xiaomi MiMo text and streaming pilot","lvl3":""}},
|
|
9798
9798
|
{"objectID":"cab460c84439c33f9cb5dcc1bd16e9235de01e05431b2d30b17098ec5e025e2a","title":"Exact source facts","url":"/docs/provider-integration/pilots/xiaomi-mimo-source-pilot#exact-source-facts","content":"All pages below are on the vendor's own documentation host, mimo.mi.com, and\nwere retrieved on 2026-10-10 (hashes at the end).\nContext and output integers. The model table (model.md) shows only the\n rounded labels 1M and 128K, so nothing was expanded from it. The integers\n come from two vendor-authored client configurations that bind them to the\n exact id mimo-v2.6-flash: the OpenClaw guide (\"contextWindow\": 1048576,\n \"maxTokens\": 131072) and the OpenCode guide (\"limit\": { \"context\": 1048576,\n\"output\": 131072 }). Both name https://api.xiaomimimo.com/v1 as the\n pay-as-you-go base URL. The two pages use different client schemas and agree.\n The API reference independently gives [1, 131072] as the required range of\n max_completion_tokens and a default of 131072 for mimo-v2.6-flash; that\n parameter covers visible plus reasoning tokens. No first-party prose or spec\n table states the context integer; the OpenClaw and OpenCode snippets are the\n only bindings, and 1048576 equals 1024 * 1024.\nRoute and auth. The API reference documents\n https://api.xiaomimimo.com/v1/chat/completions and two alternative headers,\n api-key: $MIMO_API_KEY and Authorization: Bearer $MIMO_API_KEY. This entry\n uses the Bearer form.\nLifecycle. mimo-v2.6-flash is current and is the named replacement for\n the retiring mimo-v2.5; it is not itself on a retirement schedule. The\n deprecation page gives mimo-v2.5 and mimo-v2.5-pro a 10:00 (UTC+8)\n switch on 2026-10-14 in its table and 18:00 (UTC+8) in a note on the same page.\n The discrepancy is preserved here; no exact switch instant is certified.","hierarchy":{"lvl0":"Provider Integration","lvl1":"Xiaomi MiMo text and streaming pilot","lvl2":"Exact source facts","lvl3":""}},
|
|
9799
9799
|
{"objectID":"99997193af8d5761fed491df17f7f0a49a60df721d802908183c25373c08fbb8","title":"Billing","url":"/docs/provider-integration/pilots/xiaomi-mimo-source-pilot#billing","content":"The API is usage-priced: the pay-as-you-go page says it \"consumes the account\nbalance based on the actual Token usage\". The promotions page describes bonus\ncredit, obtained through Refer & Earn or new-user registration, that \"can be\nused to offset pay-as-you-go API usage\" and is \"currently valid for 40 days\".\nIt also says eligibility, credit amounts and payout rules vary by campaign. The\ncatalog therefore uses promotional-credit, following the\nNAVER CLOVA Studio profile (src/lib/providers/catalog/naver-clova-studio.json).\nThis is not a free tier. Whether a payment method or identity verification is\nrequired to obtain a working key was not established for the real-time API, the\ncredit amount and eligibility were not checked on an account, and prices are\nnot recorded (the pay-as-you-go page lists CNY and USD and they were not\nconverted).","hierarchy":{"lvl0":"Provider Integration","lvl1":"Xiaomi MiMo text and streaming pilot","lvl2":"Billing","lvl3":""}},
|
|
9800
9800
|
{"objectID":"a5c82cf3d766314a9407f86e5f8129fbe40aad5857bc783b97c61d4f8bfcb3c2","title":"Scope that is deliberately not declared","url":"/docs/provider-integration/pilots/xiaomi-mimo-source-pilot#scope-that-is-deliberately-not-declared","content":"The capability booleans limit the pilot's declared scope; false is not\nevidence that the vendor lacks a feature. Tools, vision, structured output and\nSDK thinking controls are not declared because none has been probed. The\ndeprecation page notes that in thinking mode mimo-v2.6-flash ignores custom\ntemperature and top_p, so a thinking mode exists; this entry exposes no\ncontrol for it. Token Plan keys and base URLs are a separate subscription\nproduct and are out of scope.","hierarchy":{"lvl0":"Provider Integration","lvl1":"Xiaomi MiMo text and streaming pilot","lvl2":"Scope that is deliberately not declared","lvl3":""}},
|
|
9801
|
-
{"objectID":"b1920fcbf8becee8dcb34965fc790f5ca16fe64514dc33885cc42c21c8f46209","title":"Known gaps the local contract cannot close","url":"/docs/provider-integration/pilots/xiaomi-mimo-source-pilot#known-gaps-the-local-contract-cannot-close","content":"Output-budget field name. The vendor's request reference lists only\n max_completion_tokens. The
|
|
9802
|
-
{"objectID":"8d988c1b9c9f17a568ba163469be0dcabd60611fd93e92101cc9ea8f7c27a857","title":"Local public contract","url":"/docs/provider-integration/pilots/xiaomi-mimo-source-pilot#local-public-contract","content":"test/continuous-test-suite-xiaomi-mimo-pilot.ts
|
|
9801
|
+
{"objectID":"b1920fcbf8becee8dcb34965fc790f5ca16fe64514dc33885cc42c21c8f46209","title":"Known gaps the local contract cannot close","url":"/docs/provider-integration/pilots/xiaomi-mimo-source-pilot#known-gaps-the-local-contract-cannot-close","content":"Output-budget field name. The vendor's request reference lists only\n max_completion_tokens. The profile's quirks.maxTokensField maps the\n caller's fitted maxTokens budget to that field and omits max_tokens on\n generate and stream requests. An owned endpoint refuses the obsolete field\n and requires the exact requested budget before answering. This proves the\n emitted local wire contract; actual vendor acceptance and enforcement remain\n unverified. The parameter includes visible plus reasoning tokens.\nStreaming usage option. The vendor's reference documents stream but\n not stream_options. The profile's quirks.omitStreamOptions therefore omits\n that extension, preserving ordinary SSE streaming. Returned usage is still\n consumed if the vendor supplies it; no streaming usage completeness is claimed.\nEnvironment variable. The vendor's own examples name MIMO_API_KEY. The\n catalog's derived primary variable is XIAOMI_MIMO_API_KEY, and MIMO_API_KEY\n is read as a fallback through wire.apiKeyFallbackEnvVars, the mechanism the\n Sakana AI entry also uses. Removing the fallback is a one-line change if the\n maintainers prefer the pure convention.\nCeilings are source-bound only. The shared wire builder fits the output\n budget only to runtime-discovered ceilings, so the catalog's contextWindow and\n maxOutputTokens never appear on the wire, and no public CLI command or SDK\n export was found that reads them back. The owned endpoint cannot observe\n them; they rest on the cited source bindings alone.","hierarchy":{"lvl0":"Provider Integration","lvl1":"Xiaomi MiMo text and streaming pilot","lvl2":"Known gaps the local contract cannot close","lvl3":""}},
|
|
9802
|
+
{"objectID":"8d988c1b9c9f17a568ba163469be0dcabd60611fd93e92101cc9ea8f7c27a857","title":"Local public contract","url":"/docs/provider-integration/pilots/xiaomi-mimo-source-pilot#local-public-contract","content":"test/continuous-test-suite-xiaomi-mimo-pilot.ts retains its original 12 cases through the\nbuilt public SDK and built CLI, with optional --package-root support for a\nlater installed consumer:\n\n| Cases | Count | Required observation |\n| -------------------------------------------------------- | ----: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| SDK/CLI generate/stream default | 4 | Actual catalog default, route, Bearer header, unique user prompt, max_completion_tokens: 32, no max_tokens or stream_options, stream mode, no tools/tool choice, and fresh answer |\n| SDK/CLI generate/stream invalid explicit id | 4 | All wire preconditions pass before HTTP 400 rejection; no fallback or successful reply |\n| SDK and CLI generate, only MIMO_API_KEY | 2 | The vendor-documented variable alone reaches the wire as the Bearer credential |\n| SDK generate, both variables set | 1 | XIAOMI_MIMO_API_KEY wins; the fallback's value never reaches the wire |\n| SDK generate, no key | 1 | Refusal before any request, naming XIAOMI_MIMO_API_KEY |\n| SDK/CLI generate/stream, budgets","hierarchy":{"lvl0":"Provider Integration","lvl1":"Xiaomi MiMo text and streaming pilot","lvl2":"Local public contract","lvl3":""}},
|
|
9803
9803
|
{"objectID":"ffc6f8c30e69161df522917d0ff982175110507d3cfcc174b2e5144f23773699","title":"Provenance and remaining gates","url":"/docs/provider-integration/pilots/xiaomi-mimo-source-pilot#provenance-and-remaining-gates","content":"The legacy evidence.rosterVerified slot carries the explicit\nPUBLIC_DOCS_ONLY_NOT_ROSTER_VERIFIED marker and documentation methods; it has\nno HTTP status, auth probe or roster. billingProbe is likewise documentation\nonly. liveMatrix is null. addedInPR holds the canonical introduction PR URL,\nhttps://github.com/juspay/neurolink/pull/1977; it was PENDING_PR in the\nfirst commit, before the PR existed. A URL alone is\nnot proof of merge, and source-stage admission gives no provider-count, roster,\nlive, installed-package or publication credit.\n\nAuthenticated roster, account creation, funding, live inference, installed\nconsumer acceptance and delivery are separate and not done here.","hierarchy":{"lvl0":"Provider Integration","lvl1":"Xiaomi MiMo text and streaming pilot","lvl2":"Provenance and remaining gates","lvl3":""}},
|
|
9804
9804
|
{"objectID":"af08e2fec005ca76c90a90418848d429bab413b64e1b8a2b1501bcbcb7f58827","title":"Source receipts","url":"/docs/provider-integration/pilots/xiaomi-mimo-source-pilot#source-receipts","content":"Retrieved with a plain GET on 2026-10-10; the SHA-256 is of each response body.\n\n| First-party source | Body SHA256 |\n| ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |\n| Model table | 26a7f23c7a12410e10cc75610dc9e6c364a637495161f5d41bc2a21e1075ed84 |\n| OpenClaw integration | 4fab15ca323ac46f8c9905d5a82d7cb02023220f17d20ba21c69dce5b540c924 |\n| OpenCode integration | d39cb672b9f9da03f3da00e83c964849bfdf3f9d06ca54efbbabd5374aa8c376 |\n| OpenAI-compatible API reference | 1be241b9a882b3c70954e8ec04031cb657b06c8e0b0bbb8511e5b6ec63b82ae7 |\n| Promotions FAQ | 63e8515066b5ec06a61e71262b4a5f41b945f9bd4e540b76299f3437880223e7 |\n| Pay-as-you-go pricing | f62427a339e91edbb252cc6b54cac92050d4254483b1e7eb97a234d6d32f947b |\n| Deprecation schedule | f5c856884116df8ebba552550ec5c6912b1d0bd8edad66e2bf1e973da6270068 |","hierarchy":{"lvl0":"Provider Integration","lvl1":"Xiaomi MiMo text and streaming pilot","lvl2":"Source receipts","lvl3":""}},
|
|
9805
9805
|
{"objectID":"bf3e1f8f1233a9b3d12aedbdbec4bf8cd196d18bf56b7bb104b34e31e90b61e0","title":"Provider Onboarding Tiers","url":"/docs/provider-integration/tiers/README","content":"Provider Onboarding Tiers\n\nFour tiers, ordered by effort. Always pick the lowest tier that's\nactually true for the provider you're adding — a provider that's\nOpenAI-wire-compatible but gets built as a bespoke Tier 3 subclass \"to be\nsafe\" is exactly the copy-pasted-boilerplate problem this redesign\nexists to eliminate (see ../adr/0002-catalog-over-subclass-default.md).\n\nProvider Integration index\n\n| Tier | Example | Code required | Time |\n| -------------------------- | ---------------------------------------------------------------------------------- | ----------------------------------------------------------------- | --------------------------------- |\n| 1 — Aggregator passthrough | A new model id on an existing LiteLLM/OpenRouter route | None | Minutes |\n| 2 — Catalog entry | A new zero-quirk OpenAI-compatible vendor (the Groq/xAI/Together shape) | One data row + one mocked-test section | ~1 hour |\n| 3 — Adapter-based native | A vendor with its own SDK/wire format but a normal request/response HTTP lifecycle | One provider class | Days |\n| 4 — Full custom | SageMaker-class: non-HTTP protocol, SDK-signed auth, bespoke lifecycle | Custom executeStream/doGenerate, possibly own CLI subcommands | Days, needs written justification |\n\nTier 1 adds zero provider coverage — it is a usage change against an\nalready-counted aggregator, never reflected in\ndocs/reference/provider-comparison.md or the README's provider count.\n\nEvery tier that adds a new AIProviderName member (Tier 2 and above) ends\nthe same way: a manifest at\ndocs/provider-integration/manifests/<provider>.json\n(see ../manifests/README.md) and a green run\nof pnpm run verify:provider-onboarding (see\n../../../tools/verify-provider-onboarding.ts).\nTier 1 needs no manifest and no gate — see\ntier-1-aggregator-passthrough.md.\n\nUse ../../../tools/scaffold-provider.ts\n(pnpm run scaffold:provider) to generate the starting-point snippets for\nTiers 2–4 instead of copy-pasting from an existing provider by hand. Both\ntools ship in the tree; there is no manual-fallback era anymore — a PR\nthat skips the gate locally just fails it in CI.","hierarchy":{"lvl0":"Provider Integration","lvl1":"Provider Onboarding Tiers","lvl2":"","lvl3":""}},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "12.55.
|
|
3
|
+
"version": "12.55.1",
|
|
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": {
|
|
@@ -164,6 +164,7 @@
|
|
|
164
164
|
"test:provider-wiring": "pnpm exec tsx test/continuous-test-suite-provider-wiring.ts",
|
|
165
165
|
"test:embedding-response-validation": "pnpm exec tsx test/continuous-test-suite-embedding-response-validation.ts",
|
|
166
166
|
"test:xiaomi-mimo-pilot": "pnpm exec tsx test/continuous-test-suite-xiaomi-mimo-pilot.ts",
|
|
167
|
+
"test:mimo-overflow-budget": "pnpm exec tsx test/continuous-test-suite-mimo-overflow-budget.ts",
|
|
167
168
|
"test:longcat-pilot": "pnpm exec tsx test/continuous-test-suite-longcat-pilot.ts",
|
|
168
169
|
"test:runinfra-pilot": "pnpm exec tsx test/continuous-test-suite-runinfra-pilot.ts",
|
|
169
170
|
"test:pdf-image-streaming": "pnpm exec tsx test/continuous-test-suite-pdf-image-streaming.ts",
|