@code-yeongyu/senpi-ai 2026.10.19 → 2026.10.21-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/dist/api/anthropic-messages.js +7 -2
- package/dist/api/anthropic-request-shape-log.d.ts +24 -0
- package/dist/api/anthropic-request-shape-log.js +50 -0
- package/dist/api/openai-codex-responses/provider-diagnostic.d.ts +4 -0
- package/dist/api/openai-codex-responses/provider-diagnostic.js +71 -0
- package/dist/api/openai-codex-responses.js +14 -7
- package/dist/api/openai-images.js +7 -2
- package/dist/model.d.ts +2 -0
- package/dist/provider-diagnostic.d.ts +2 -0
- package/dist/provider-diagnostic.js +12 -2
- package/dist/providers/data/.manifest.json +1 -1
- package/dist/providers/data/alibaba-token-plan.json +1 -1
- package/dist/providers/data/amazon-bedrock.json +1 -1
- package/dist/providers/data/azure-openai-responses.json +1 -1
- package/dist/providers/data/baseten.json +1 -1
- package/dist/providers/data/cerebras.json +1 -1
- package/dist/providers/data/cloudflare-ai-gateway.json +1 -1
- package/dist/providers/data/cloudflare-workers-ai.json +1 -1
- package/dist/providers/data/github-copilot.json +1 -1
- package/dist/providers/data/google.json +1 -1
- package/dist/providers/data/groq.json +1 -1
- package/dist/providers/data/huggingface.json +1 -1
- package/dist/providers/data/minimax-cn.json +1 -1
- package/dist/providers/data/minimax.json +1 -1
- package/dist/providers/data/mistral.json +1 -1
- package/dist/providers/data/moonshotai-cn.json +1 -1
- package/dist/providers/data/openai.json +1 -1
- package/dist/providers/data/opencode-go.json +1 -1
- package/dist/providers/data/opencode.json +1 -1
- package/dist/providers/data/opengateway.json +1 -1
- package/dist/providers/data/openrouter.json +1 -1
- package/dist/providers/data/qwen-token-plan-cn.json +1 -1
- package/dist/providers/data/qwen-token-plan.json +1 -1
- package/dist/providers/data/radius.json +1 -1
- package/dist/providers/data/together.json +1 -1
- package/dist/providers/data/venice.json +1 -1
- package/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/dist/providers/data/xai.json +1 -1
- package/dist/types.d.ts +7 -0
- package/dist/utils/provider-diagnostic-vocabulary.d.ts +4 -0
- package/dist/utils/provider-diagnostic-vocabulary.js +22 -0
- package/package.json +2 -2
|
@@ -29,6 +29,7 @@ import { sendWithForcedToolChoiceFallback } from "../utils/tool-choice-fallback.
|
|
|
29
29
|
import { resolveRootObjectSchema } from "../utils/tool-schema-compat.js";
|
|
30
30
|
import { getCurrentTools, getDeclaredTools, getInitialSystemMessage, hasToolRedefinitions, normalizeContext, resolveTranscript, } from "../utils/transcript.js";
|
|
31
31
|
import { isAnthropicWebSearchReplayBlock, isReplayableAnthropicProviderNativeBlock, } from "./anthropic-native-replay-blocks.js";
|
|
32
|
+
import { logAnthropicRequestShape } from "./anthropic-request-shape-log.js";
|
|
32
33
|
import { sanitizeAnthropicToolPairs } from "./anthropic-tool-pairs.js";
|
|
33
34
|
import { demoteToolReferenceReplay, demoteUnavailableToolReferences } from "./anthropic-tool-references.js";
|
|
34
35
|
import { demoteExpiredWebSearchReplay, expiredWebSearchReplayIds, isExpiredWebSearchContentError, } from "./anthropic-web-search-expiry.js";
|
|
@@ -74,7 +75,7 @@ function getCacheControl(model, cacheRetention, env) {
|
|
|
74
75
|
// The bundled Claude Code version and the floor of the advertised `claude-cli/<version>`
|
|
75
76
|
// (see utils/claude-code-version.ts). Keep this exact declaration: a downstream installer
|
|
76
77
|
// (oh-my-openagent) rewrites it byte-for-byte in the installed dist and bundle.
|
|
77
|
-
const claudeCodeVersion = "2.1.
|
|
78
|
+
const claudeCodeVersion = "2.1.306";
|
|
78
79
|
// Claude Code 2.x tool names (canonical casing)
|
|
79
80
|
// Source: https://cchistory.mariozechner.at/data/prompts-2.1.11.md
|
|
80
81
|
// To update: https://github.com/badlogic/cchistory
|
|
@@ -1035,7 +1036,11 @@ export const stream = (model, context, options) => {
|
|
|
1035
1036
|
maxRetries: 0,
|
|
1036
1037
|
...(payloadRequestMetadata.headers ? { headers: payloadRequestMetadata.headers } : {}),
|
|
1037
1038
|
};
|
|
1038
|
-
|
|
1039
|
+
// Logged before the call: the SDK throws on a non-2xx, and a rejected attempt is the one worth rebuilding.
|
|
1040
|
+
const send = (body) => {
|
|
1041
|
+
logAnthropicRequestShape(model, body);
|
|
1042
|
+
return awaitProviderTransport(() => client.beta.messages.create({ ...body, stream: true }, requestOptions).asResponse(), anthropicProviderDiagnosticFromError);
|
|
1043
|
+
};
|
|
1039
1044
|
const sent = await sendWithForcedToolChoiceFallback({
|
|
1040
1045
|
target: model,
|
|
1041
1046
|
params,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** Debug-only request skeleton: roles, block types and tool ids per index, never content (senpi#3727). */
|
|
2
|
+
export declare const REQUEST_SHAPE_LOG_ENV = "SENPI_DEBUG_REQUEST_SHAPE";
|
|
3
|
+
interface BlockSkeleton {
|
|
4
|
+
readonly type: string;
|
|
5
|
+
readonly id?: string;
|
|
6
|
+
readonly toolUseId?: string;
|
|
7
|
+
}
|
|
8
|
+
interface MessageSkeleton {
|
|
9
|
+
readonly index: number;
|
|
10
|
+
readonly role: string;
|
|
11
|
+
readonly blocks: readonly BlockSkeleton[] | "string";
|
|
12
|
+
}
|
|
13
|
+
export declare function anthropicRequestSkeleton(params: {
|
|
14
|
+
readonly messages?: unknown;
|
|
15
|
+
}): MessageSkeleton[];
|
|
16
|
+
type AppendFile = (path: string, data: string) => void;
|
|
17
|
+
export declare function logAnthropicRequestShape(model: {
|
|
18
|
+
readonly provider: string;
|
|
19
|
+
readonly id: string;
|
|
20
|
+
}, params: {
|
|
21
|
+
readonly messages?: unknown;
|
|
22
|
+
}, env?: Readonly<Record<string, string | undefined>>, appendFile?: AppendFile | undefined): void;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=anthropic-request-shape-log.d.ts.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/** Debug-only request skeleton: roles, block types and tool ids per index, never content (senpi#3727). */
|
|
2
|
+
export const REQUEST_SHAPE_LOG_ENV = "SENPI_DEBUG_REQUEST_SHAPE";
|
|
3
|
+
function isRecord(value) {
|
|
4
|
+
return typeof value === "object" && value !== null;
|
|
5
|
+
}
|
|
6
|
+
function skeletonBlock(block) {
|
|
7
|
+
if (!isRecord(block))
|
|
8
|
+
return { type: typeof block };
|
|
9
|
+
const type = typeof block.type === "string" ? block.type : "unknown";
|
|
10
|
+
return {
|
|
11
|
+
type,
|
|
12
|
+
...(typeof block.id === "string" ? { id: block.id } : {}),
|
|
13
|
+
...(typeof block.tool_use_id === "string" ? { toolUseId: block.tool_use_id } : {}),
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export function anthropicRequestSkeleton(params) {
|
|
17
|
+
const messages = Array.isArray(params.messages) ? params.messages : [];
|
|
18
|
+
return messages.map((message, index) => {
|
|
19
|
+
if (!isRecord(message))
|
|
20
|
+
return { index, role: "unknown", blocks: [] };
|
|
21
|
+
const role = typeof message.role === "string" ? message.role : "unknown";
|
|
22
|
+
const blocks = Array.isArray(message.content) ? message.content.map(skeletonBlock) : "string";
|
|
23
|
+
return { index, role, blocks };
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function resolveAppendFile() {
|
|
27
|
+
if (typeof process === "undefined")
|
|
28
|
+
return undefined;
|
|
29
|
+
const fs = process.getBuiltinModule?.("node:fs");
|
|
30
|
+
return fs ? (path, data) => fs.appendFileSync(path, data, { mode: 0o600 }) : undefined;
|
|
31
|
+
}
|
|
32
|
+
function processEnv() {
|
|
33
|
+
return typeof process === "undefined" ? {} : process.env;
|
|
34
|
+
}
|
|
35
|
+
export function logAnthropicRequestShape(model, params, env = processEnv(), appendFile = undefined) {
|
|
36
|
+
const path = env[REQUEST_SHAPE_LOG_ENV];
|
|
37
|
+
if (path === undefined || path.length === 0)
|
|
38
|
+
return;
|
|
39
|
+
const append = appendFile ?? resolveAppendFile();
|
|
40
|
+
if (append === undefined)
|
|
41
|
+
return;
|
|
42
|
+
const record = {
|
|
43
|
+
ts: new Date().toISOString(),
|
|
44
|
+
provider: model.provider,
|
|
45
|
+
model: model.id,
|
|
46
|
+
messages: anthropicRequestSkeleton(params),
|
|
47
|
+
};
|
|
48
|
+
append(path, `${JSON.stringify(record)}\n`);
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=anthropic-request-shape-log.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ProviderDiagnostic } from "../../provider-diagnostic.ts";
|
|
2
|
+
export declare function codexHttpProviderDiagnostic(status: number, bodyText: string, nowMs?: number): ProviderDiagnostic | undefined;
|
|
3
|
+
export declare function codexEventProviderDiagnostic(event: Record<string, unknown>, nowMs?: number): ProviderDiagnostic | undefined;
|
|
4
|
+
//# sourceMappingURL=provider-diagnostic.d.ts.map
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { buildProviderDiagnostic, categoryForProviderCode, classifyProviderFailure, isOpaqueProviderCode, isProviderDiagnosticResetsAt, isProviderDiagnosticStatus, } from "../../utils/provider-diagnostic-vocabulary.js";
|
|
2
|
+
/**
|
|
3
|
+
* The providerDiagnostic for a ChatGPT-subscription (Codex backend) failure (senpi#3771). The
|
|
4
|
+
* backend reports a refusal three ways: an HTTP error body, an in-stream `error` event (the
|
|
5
|
+
* WebSocket form carries the HTTP status inline) and a `response.failed` event whose error sits
|
|
6
|
+
* under `response.error`. All three name the error by `error.code` or `error.type` and may name the
|
|
7
|
+
* reset by `resets_at` (epoch seconds) or `resets_in_seconds`.
|
|
8
|
+
*/
|
|
9
|
+
function asRecord(value) {
|
|
10
|
+
return typeof value === "object" && value !== null && !Array.isArray(value)
|
|
11
|
+
? value
|
|
12
|
+
: undefined;
|
|
13
|
+
}
|
|
14
|
+
function nonEmptyString(value) {
|
|
15
|
+
return typeof value === "string" && value.length > 0 ? value : undefined;
|
|
16
|
+
}
|
|
17
|
+
function errorCode(error) {
|
|
18
|
+
return nonEmptyString(error?.code) ?? nonEmptyString(error?.type);
|
|
19
|
+
}
|
|
20
|
+
function resetsAtMs(error, nowMs) {
|
|
21
|
+
const absolute = error?.resets_at;
|
|
22
|
+
if (typeof absolute === "number" && Number.isFinite(absolute) && absolute > 0) {
|
|
23
|
+
const ms = Math.round(absolute < 1e12 ? absolute * 1000 : absolute);
|
|
24
|
+
return isProviderDiagnosticResetsAt(ms) ? ms : undefined;
|
|
25
|
+
}
|
|
26
|
+
const relative = error?.resets_in_seconds;
|
|
27
|
+
if (typeof relative === "number" && Number.isFinite(relative) && relative >= 0) {
|
|
28
|
+
const ms = Math.round(nowMs + relative * 1000);
|
|
29
|
+
return isProviderDiagnosticResetsAt(ms) ? ms : undefined;
|
|
30
|
+
}
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
function classifyCodexFailure(facts) {
|
|
34
|
+
const status = isProviderDiagnosticStatus(facts.status) ? facts.status : undefined;
|
|
35
|
+
const reset = facts.resetsAt === undefined ? {} : { resetsAt: facts.resetsAt };
|
|
36
|
+
if (facts.code !== undefined && categoryForProviderCode(facts.code) !== undefined) {
|
|
37
|
+
const classified = classifyProviderFailure({ status, code: facts.code }) ??
|
|
38
|
+
classifyProviderFailure({ status: undefined, code: facts.code });
|
|
39
|
+
return classified === undefined ? undefined : buildProviderDiagnostic({ ...classified, ...reset });
|
|
40
|
+
}
|
|
41
|
+
const byStatus = status === undefined ? undefined : classifyProviderFailure({ status, code: undefined });
|
|
42
|
+
if (byStatus !== undefined && byStatus.category !== "unknown")
|
|
43
|
+
return byStatus;
|
|
44
|
+
const opaque = [facts.code, facts.fallbackCode].find((code) => code !== undefined && isOpaqueProviderCode(code));
|
|
45
|
+
if (opaque !== undefined)
|
|
46
|
+
return buildProviderDiagnostic({ category: "unknown", code: opaque, evidence: "structured_code" });
|
|
47
|
+
return byStatus;
|
|
48
|
+
}
|
|
49
|
+
export function codexHttpProviderDiagnostic(status, bodyText, nowMs = Date.now()) {
|
|
50
|
+
let error;
|
|
51
|
+
try {
|
|
52
|
+
error = asRecord(asRecord(JSON.parse(bodyText))?.error);
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
error = undefined;
|
|
56
|
+
}
|
|
57
|
+
return classifyCodexFailure({ status, code: errorCode(error), resetsAt: resetsAtMs(error, nowMs) });
|
|
58
|
+
}
|
|
59
|
+
export function codexEventProviderDiagnostic(event, nowMs = Date.now()) {
|
|
60
|
+
const response = asRecord(event.response);
|
|
61
|
+
const error = asRecord(event.error) ?? asRecord(response?.error);
|
|
62
|
+
const status = typeof event.status === "number" ? event.status : undefined;
|
|
63
|
+
const eventType = nonEmptyString(event.type);
|
|
64
|
+
return classifyCodexFailure({
|
|
65
|
+
status,
|
|
66
|
+
code: errorCode(error) ?? nonEmptyString(event.code),
|
|
67
|
+
...(eventType === undefined ? {} : { fallbackCode: eventType }),
|
|
68
|
+
resetsAt: resetsAtMs(error, nowMs),
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=provider-diagnostic.js.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { readProviderDiagnostic } from "../provider-diagnostic.js";
|
|
1
2
|
import { getWireIdentity } from "../wire-identity.js";
|
|
2
3
|
function loadNodeOs() {
|
|
3
4
|
if (typeof process === "undefined" || !(process.versions?.node || process.versions?.bun)) {
|
|
@@ -16,6 +17,8 @@ import { formatProviderError, normalizeProviderError } from "../utils/error-body
|
|
|
16
17
|
import { AssistantMessageEventStream } from "../utils/event-stream.js";
|
|
17
18
|
import { headersToRecord } from "../utils/headers.js";
|
|
18
19
|
import { resolveHttpProxyUrlForTarget } from "../utils/node-http-proxy.js";
|
|
20
|
+
import { attachProviderDiagnostic } from "../utils/provider-diagnostic-carrier.js";
|
|
21
|
+
import { transportProviderDiagnosticFromError } from "../utils/provider-diagnostic-sources.js";
|
|
19
22
|
import { appendRetryAfterMsMarker, extract429RetryAfterMs } from "../utils/retry-hint.js";
|
|
20
23
|
import { getSystemMessageText } from "../utils/text.js";
|
|
21
24
|
import { getDeclaredTools, getInitialSystemMessage, normalizeContext, resolveTranscript } from "../utils/transcript.js";
|
|
@@ -23,6 +26,7 @@ import { uuidv7 } from "../utils/uuid.js";
|
|
|
23
26
|
import { describeChatGptUsageLimitEvent, describeChatGptUsageLimitResponse } from "./chatgpt-usage-limit.js";
|
|
24
27
|
import { createGrammarToolInputProperties } from "./constrained-sampling.js";
|
|
25
28
|
import { clearWebSocketFallbackState, getOrCreateWebSocketDebugStats, getWebSocketDebugStats, isWebSocketSseFallbackActive, recordWebSocketFailure, recordWebSocketSseFallback, recordWebSocketSuccess, } from "./openai-codex-responses/fallback-state.js";
|
|
29
|
+
import { codexEventProviderDiagnostic, codexHttpProviderDiagnostic, } from "./openai-codex-responses/provider-diagnostic.js";
|
|
26
30
|
import { buildCodexReasoning } from "./openai-codex-responses/reasoning.js";
|
|
27
31
|
import { applyChatGptSubscriptionCacheAffinityHeaders, clampOpenAIPromptCacheKey } from "./openai-prompt-cache.js";
|
|
28
32
|
import { convertResponsesMessages, convertResponsesTools, processResponsesStream, resolveResponsesDeferredToolsMode, resolveResponsesToolPlacement, } from "./openai-responses-shared.js";
|
|
@@ -317,7 +321,7 @@ export const stream = (model, context, options) => {
|
|
|
317
321
|
errorMessage = appendRetryAfterMsMarker(errorMessage, hintMs);
|
|
318
322
|
}
|
|
319
323
|
}
|
|
320
|
-
throw new Error(errorMessage);
|
|
324
|
+
throw attachProviderDiagnostic(new Error(errorMessage), codexHttpProviderDiagnostic(response.status, errorText));
|
|
321
325
|
}
|
|
322
326
|
catch (error) {
|
|
323
327
|
if (error instanceof Error) {
|
|
@@ -363,6 +367,11 @@ export const stream = (model, context, options) => {
|
|
|
363
367
|
}
|
|
364
368
|
output.stopReason = options?.signal?.aborted ? "aborted" : "error";
|
|
365
369
|
output.errorMessage = formatProviderError(normalizeProviderError(error));
|
|
370
|
+
const providerDiagnostic = output.stopReason === "error"
|
|
371
|
+
? (readProviderDiagnostic(error) ?? transportProviderDiagnosticFromError(error))
|
|
372
|
+
: undefined;
|
|
373
|
+
if (providerDiagnostic !== undefined)
|
|
374
|
+
output.providerDiagnostic = providerDiagnostic;
|
|
366
375
|
stream.push({ type: "error", reason: output.stopReason, error: output });
|
|
367
376
|
stream.end();
|
|
368
377
|
}
|
|
@@ -593,20 +602,18 @@ async function* mapCodexEvents(events, output, model, onProviderStreamEvent) {
|
|
|
593
602
|
if (hintMs !== undefined) {
|
|
594
603
|
errorText = appendRetryAfterMsMarker(errorText, hintMs);
|
|
595
604
|
}
|
|
596
|
-
throw new CodexApiError(errorText, {
|
|
597
|
-
code: code || undefined,
|
|
598
|
-
payload: event,
|
|
599
|
-
});
|
|
605
|
+
throw attachProviderDiagnostic(new CodexApiError(errorText, { code: code || undefined, payload: event }), codexEventProviderDiagnostic(event));
|
|
600
606
|
}
|
|
601
607
|
if (type === "response.failed") {
|
|
602
608
|
const code = getCodexEventErrorCode(event);
|
|
603
609
|
const message = getCodexEventErrorMessage(event);
|
|
604
|
-
let errorText =
|
|
610
|
+
let errorText = describeChatGptUsageLimitEvent({ ...event, error: getCodexEventError(event) }) ??
|
|
611
|
+
(message || "Codex response failed");
|
|
605
612
|
const hintMs = extract429RetryAfterMs({ bodyText: JSON.stringify(event) });
|
|
606
613
|
if (hintMs !== undefined) {
|
|
607
614
|
errorText = appendRetryAfterMsMarker(errorText, hintMs);
|
|
608
615
|
}
|
|
609
|
-
throw new CodexApiError(errorText, { code, payload: event });
|
|
616
|
+
throw attachProviderDiagnostic(new CodexApiError(errorText, { code, payload: event }), codexEventProviderDiagnostic(event));
|
|
610
617
|
}
|
|
611
618
|
if (type === "response.done" || type === "response.completed" || type === "response.incomplete") {
|
|
612
619
|
const response = event.response;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import OpenAI from "openai";
|
|
2
|
+
import { readProviderDiagnostic } from "../provider-diagnostic.js";
|
|
2
3
|
import { formatProviderError, normalizeProviderError } from "../utils/error-body.js";
|
|
3
4
|
import { headersToRecord } from "../utils/headers.js";
|
|
5
|
+
import { awaitProviderTransport, openAICompatibleProviderDiagnosticFromError, } from "../utils/provider-diagnostic-sources.js";
|
|
4
6
|
import { retryProviderRequest } from "../utils/provider-retry.js";
|
|
5
7
|
import { resolveOpenAIClientAuth } from "./openai-client-auth.js";
|
|
6
8
|
import { buildEditParams } from "./openai-images-edit.js";
|
|
@@ -46,9 +48,9 @@ export const generateImages = async (model, context, options) => {
|
|
|
46
48
|
const { data: response, response: rawResponse } = await retryProviderRequest(() => {
|
|
47
49
|
// openai SDK pinned at 6.26.0 predates gpt-image-2.5 quality tiers
|
|
48
50
|
const sdkParams = params;
|
|
49
|
-
return (method === "edit"
|
|
51
|
+
return awaitProviderTransport(() => (method === "edit"
|
|
50
52
|
? client.images.edit(sdkParams, requestOptions)
|
|
51
|
-
: client.images.generate(sdkParams, requestOptions)).withResponse();
|
|
53
|
+
: client.images.generate(sdkParams, requestOptions)).withResponse(), openAICompatibleProviderDiagnosticFromError);
|
|
52
54
|
}, {
|
|
53
55
|
maxRetries: options?.maxRetries,
|
|
54
56
|
maxRetryDelayMs: options?.maxRetryDelayMs,
|
|
@@ -75,6 +77,9 @@ export const generateImages = async (model, context, options) => {
|
|
|
75
77
|
catch (error) {
|
|
76
78
|
output.stopReason = options?.signal?.aborted ? "aborted" : "error";
|
|
77
79
|
output.errorMessage = formatProviderError(normalizeProviderError(error));
|
|
80
|
+
const providerDiagnostic = output.stopReason === "error" ? readProviderDiagnostic(error) : undefined;
|
|
81
|
+
if (providerDiagnostic !== undefined)
|
|
82
|
+
output.providerDiagnostic = providerDiagnostic;
|
|
78
83
|
return output;
|
|
79
84
|
}
|
|
80
85
|
};
|
package/dist/model.d.ts
CHANGED
|
@@ -32,6 +32,8 @@ export interface Model<TApi extends Api> extends BaseModel<TApi> {
|
|
|
32
32
|
* (for example `-fast` priority-tier variants aliasing their base model).
|
|
33
33
|
*/
|
|
34
34
|
upstreamModelId?: string;
|
|
35
|
+
/** True when the upstream catalog marks this model deprecated; it stays usable until it is removed upstream. */
|
|
36
|
+
deprecated?: boolean;
|
|
35
37
|
/** Service tier requested by default for this model (for example `-fast` variants). */
|
|
36
38
|
serviceTier?: "auto" | "flex" | "priority" | "ultrafast";
|
|
37
39
|
/** Whether to recover supported text-encoded tool calls from assistant text. */
|
|
@@ -16,6 +16,8 @@ export interface ProviderDiagnostic {
|
|
|
16
16
|
/** Provider token from the closed allowlist, never raw provider text. */
|
|
17
17
|
code?: string;
|
|
18
18
|
evidence: ProviderDiagnosticEvidence;
|
|
19
|
+
/** When a `quota` or `rate_limit` failure resets (epoch ms), when the provider named it. */
|
|
20
|
+
resetsAt?: number;
|
|
19
21
|
}
|
|
20
22
|
export { PROVIDER_DIAGNOSTIC_MAX_BYTES };
|
|
21
23
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { peekProviderDiagnostic } from "./utils/provider-diagnostic-carrier.js";
|
|
2
|
-
import { buildProviderDiagnostic, categoryForProviderCode, categoryForProviderStatus, categoryForTransportCode, isProviderCodeStatusCompatible, isProviderDiagnosticCategory, isProviderDiagnosticStatus, PROVIDER_DIAGNOSTIC_MAX_BYTES, } from "./utils/provider-diagnostic-vocabulary.js";
|
|
2
|
+
import { buildProviderDiagnostic, categoryForProviderCode, categoryForProviderStatus, categoryForTransportCode, isOpaqueProviderCode, isProviderCodeStatusCompatible, isProviderDiagnosticCategory, isProviderDiagnosticResetsAt, isProviderDiagnosticStatus, PROVIDER_DIAGNOSTIC_MAX_BYTES, } from "./utils/provider-diagnostic-vocabulary.js";
|
|
3
3
|
export { PROVIDER_DIAGNOSTIC_MAX_BYTES };
|
|
4
4
|
function readField(value, key) {
|
|
5
5
|
return Reflect.get(value, key);
|
|
@@ -17,16 +17,20 @@ export function sanitizeProviderDiagnostic(value) {
|
|
|
17
17
|
const evidence = readField(value, "evidence");
|
|
18
18
|
const httpStatus = readField(value, "httpStatus");
|
|
19
19
|
const code = readField(value, "code");
|
|
20
|
+
const resetsAt = readField(value, "resetsAt");
|
|
20
21
|
if (!isProviderDiagnosticCategory(category))
|
|
21
22
|
return undefined;
|
|
22
23
|
if (httpStatus !== undefined && !isProviderDiagnosticStatus(httpStatus))
|
|
23
24
|
return undefined;
|
|
25
|
+
if (resetsAt !== undefined && !isProviderDiagnosticResetsAt(resetsAt))
|
|
26
|
+
return undefined;
|
|
27
|
+
const reset = resetsAt === undefined ? {} : { resetsAt };
|
|
24
28
|
if (evidence === "structured_status") {
|
|
25
29
|
if (code !== undefined || !isProviderDiagnosticStatus(httpStatus))
|
|
26
30
|
return undefined;
|
|
27
31
|
if (category !== categoryForProviderStatus(httpStatus))
|
|
28
32
|
return undefined;
|
|
29
|
-
return buildProviderDiagnostic({ category, httpStatus, evidence });
|
|
33
|
+
return buildProviderDiagnostic({ category, httpStatus, evidence, ...reset });
|
|
30
34
|
}
|
|
31
35
|
if (evidence === "structured_transport") {
|
|
32
36
|
if (httpStatus !== undefined || typeof code !== "string")
|
|
@@ -37,6 +41,11 @@ export function sanitizeProviderDiagnostic(value) {
|
|
|
37
41
|
}
|
|
38
42
|
if (evidence !== "structured_code" || typeof code !== "string")
|
|
39
43
|
return undefined;
|
|
44
|
+
if (isOpaqueProviderCode(code)) {
|
|
45
|
+
if (category !== "unknown" || httpStatus !== undefined)
|
|
46
|
+
return undefined;
|
|
47
|
+
return buildProviderDiagnostic({ category, code, evidence });
|
|
48
|
+
}
|
|
40
49
|
if (categoryForProviderCode(code) !== category)
|
|
41
50
|
return undefined;
|
|
42
51
|
if (httpStatus !== undefined && !isProviderCodeStatusCompatible(code, httpStatus))
|
|
@@ -46,6 +55,7 @@ export function sanitizeProviderDiagnostic(value) {
|
|
|
46
55
|
...(httpStatus === undefined ? {} : { httpStatus }),
|
|
47
56
|
code,
|
|
48
57
|
evidence,
|
|
58
|
+
...reset,
|
|
49
59
|
});
|
|
50
60
|
}
|
|
51
61
|
catch {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schemaVersion":6,"generatedAt":"2026-10-
|
|
1
|
+
{"schemaVersion":6,"generatedAt":"2026-10-21T14:57:24.757Z","structureHash":"c290d5a2d714df23cd51f05e4d5cea972a54ce316cc09c82fb405a0d452c0496","files":{"alibaba-token-plan.json":"9f4d42cc765b2a875bcdcaa392bfdc1323c88968309baf9db9f611a26c595c73","amazon-bedrock.json":"ef21ed069f5b3aedec7b60c9effc1add5629244d1d475a3a6c9576cb5576e1fe","ant-ling.json":"628feab3ef6c7d80ce96f75999804e1d9f05fec3851e5302e30fff3b69db90f6","anthropic.json":"111384e9f5845e0247bd34edf2400ef7720fcbdac140b944cf8878192d8bd6ab","azure-openai-responses.json":"11aa93686d6b8585f947287c83c3407c9de346380a32b2c058fc6cab138ce024","bai.json":"7e6861aaf27d8af34e1771c6092602194fcec0a0046e6adfab9c3ee54d32b99f","baseten.json":"0f10d6448352626208e2d4f62219f7cc5d657d530b7d5b248119aa7cb3ea9fd9","cerebras.json":"2eb969b2956844f9a641d3de52c19f1791293c58f607282fb3b0ebfe85ff66f8","chatgpt-subscription.json":"42b88c93d717b2a7469b71da7da5adf87347d0d9cc0f264b39117f0f940b51c0","cloudflare-ai-gateway.json":"4d821d1d0d6873240a6a7f4ba9feaade4f182ceaa0b1493f38e4973c4d05f375","cloudflare-workers-ai.json":"5e4d71ddbb66e903d98076f6de66e5627f19621e969f822a505e9d13eaf729ff","deepseek.json":"10a296fb3e898f7715c80890c8af0af4f5fd58f22dbcd6612fdc5d762157ccdc","fireworks.json":"118ca20f7c25d915c95311a367a3f6469337bbc3641f87d25d13b5405011691b","github-copilot.json":"e49aa0ca8ab969a3bd782030e6410b018ba43a82453ff7a81dcf0be38bd3b1db","google-vertex.json":"8f986b4aca8c685b0f3481bd252bda21e4858bf9015ad37fc5bcc44b7f01d076","google.json":"d25613a7377e81d785d571be514d67b35436511ce6946247dc66f8674e2a5035","groq.json":"087df37206e9eed8b10f1e558e4c496289bef60074b7e8afba4f20fb102b4ec2","huggingface.json":"0628929a39d2b802593ec1efcc38ea5c4308fe216155bb4508327c274b78075b","meta.json":"563f5ec07973f52ab8c3eb26ef91a36ad8a79e950b37174935666cdcb624bf35","minimax-cn.json":"70df757e95e9ea2275bf451956b58a746020835f6cbcbd1a644d7fad5b9941d3","minimax.json":"747038b05f4fc24e41405e8bc810f893d7d5121e214e35e6f812f775769a3806","mistral.json":"c15e0ec8fcbc16b58342242b159af6ad035e7472d06ef4ccfc17fafc947ef3dc","moonshotai-cn.json":"a53fce64e70dba1d7850d395d8029a2f773638b9e1244fc363363403bcbdb739","moonshotai.json":"62d08fd5beead025a56d5f2e4227d8516b9c5034275b1b36d761a8625918f2b9","nvidia.json":"dcf20f026f1a5cbb9001adf35e4831dcf761b0dde866d5eddf63015aa41151ec","openai.json":"1f6c767cd7c46254a96c5d6a3407b2881305e9674c7defd115c37bf6cac9da60","opencode-go.json":"26c56df1020a270b742f54e64f347a298006e6dd723a9a7721b2d34cea3eb287","opencode.json":"c3142318ec298838b19751ee8f4ffafa89fbdd11204b3e5767b2495dc120bf2c","opengateway.json":"1719fdf9fc2e385b977042d8f3bcb6eea6e3e45eb378f1f4d037fe714a310b94","openrouter.json":"78377e5913780570a119f39319d8c0f72c4752cf69d19176918c54f6d352dd8f","qwen-token-plan-cn.json":"751b18bd443fceb16659ea33013fed90fbf3bbdb4e0ffd7607c93cee2b4cf40d","qwen-token-plan-individual.json":"35ffb0ba1a1ce3f68fc73262dd5e07fbcb5bf5911ad1e6e17bc0621e2894676a","qwen-token-plan.json":"e59b0a45e238578f80d0eea937a093b9cec7cb93751ae20a9e88b16c09eb5cdd","radius.json":"e605d7413fe864c378bfd200c0400fc059cb8f6fd5b5e29b55dad16fc2cf824a","together.json":"a68b8386a2f28f9e1570d296223fdbdc0ebcca8a322ade5b999212c0e60b772c","typesafe.json":"a4429a2f696d5cc5273969af61a7310bda07d6bdcd27bf9ac9c76c534cc43716","venice.json":"d1d6caf3312324d900fbf431c5ef7a7c6e33ca5b07cf9eac4c152a3d89dfff14","vercel-ai-gateway.json":"c20894095e34477cfd181bd61ad9789105a0b90918aadf118dd53924e6b1f0c5","xai.json":"cf3f475fe5a13625f858171900ba3456c4d95ebb0bac5060cc25e29bb31d3457","xiaomi-token-plan-ams.json":"7fa339ba5675460b1ff4e5bca9e8ad0aa60b0277d75a989b1c196aa6ca2af34d","xiaomi-token-plan-cn.json":"ef7917c6ea0d3edc655c8a52082ee5f1330658aa6f10199d8f164eb4605ef0a0","xiaomi-token-plan-sgp.json":"addda93f6b70ba879db97e3cfd2e4f2efc7cda47d7daa78c23c5b0e51162de5c","xiaomi.json":"5a42caf49d3e4d7946d60386e9899c2146bf8e3cbaff4c576ee4f49b398cc11c","zai-coding-cn.json":"2b6f85e04b5c568e320b1bde25b1c1614af9342e4c1ba0e1d5bb248aaf50cfe9","zai.json":"e9cc408e1756de8abc70148d63d89d11a63c65b7ef06ad0661cd1328e4209ba3"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"openai-completions":{"chat:deepseek-v3.2":{"id":"deepseek-v3.2","name":"DeepSeek V3.2","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","requiresReasoningContentOnAssistantMessages":true,"thinkingFormat":"deepseek"},"reasoning":true,"input":["text"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":131072,"maxTokens":65536,"type":"chat"},"chat:deepseek-v4-flash":{"id":"deepseek-v4-flash","name":"DeepSeek V4 Flash","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","requiresReasoningContentOnAssistantMessages":true,"thinkingFormat":"deepseek"},"reasoning":true,"input":["text"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":1000000,"maxTokens":384000,"thinkingLevelMap":{"minimal":null,"low":null,"medium":null,"high":"high","max":"max"},"type":"chat"},"chat:deepseek-v4-flash-0731":{"id":"deepseek-v4-flash-0731","name":"DeepSeek V4 Flash 0731","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","requiresReasoningContentOnAssistantMessages":true,"thinkingFormat":"deepseek"},"reasoning":true,"input":["text"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":1000000,"maxTokens":384000,"thinkingLevelMap":{"minimal":null,"low":null,"medium":null,"high":"high","max":"max"},"type":"chat"},"chat:deepseek-v4-pro":{"id":"deepseek-v4-pro","name":"DeepSeek V4 Pro","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","requiresReasoningContentOnAssistantMessages":true,"thinkingFormat":"deepseek"},"reasoning":true,"input":["text"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":1000000,"maxTokens":384000,"thinkingLevelMap":{"minimal":null,"low":null,"medium":null,"high":"high","max":"max"},"type":"chat"},"chat:deepseek-v4-pro-0813":{"id":"deepseek-v4-pro-0813","name":"DeepSeek V4 Pro 0813","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","requiresReasoningContentOnAssistantMessages":true,"thinkingFormat":"deepseek"},"reasoning":true,"input":["text"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":1000000,"maxTokens":384000,"thinkingLevelMap":{"minimal":null,"low":null,"medium":null,"high":"high","max":"max"},"type":"chat"},"chat:deepseek-v4.1-flash":{"id":"deepseek-v4.1-flash","name":"DeepSeek V4.1 Flash","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","requiresReasoningContentOnAssistantMessages":true,"thinkingFormat":"deepseek"},"reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":1000000,"maxTokens":384000,"thinkingLevelMap":{"minimal":null,"low":null,"medium":null,"high":"high","max":"max"},"inputLimits":{"images":{"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:glm-5":{"id":"glm-5","name":"GLM-5","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens"},"reasoning":true,"input":["text"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":202752,"maxTokens":16384,"type":"chat"},"chat:glm-5.1":{"id":"glm-5.1","name":"GLM-5.1","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens"},"reasoning":true,"input":["text"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":202752,"maxTokens":128000,"type":"chat"},"chat:glm-5.2":{"id":"glm-5.2","name":"GLM-5.2","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens"},"reasoning":true,"input":["text"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":1000000,"maxTokens":131072,"type":"chat"},"chat:glm-5.3":{"id":"glm-5.3","name":"GLM-5.3","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens"},"reasoning":true,"input":["text"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":1000000,"maxTokens":131072,"type":"chat"},"chat:kimi-k2.5":{"id":"kimi-k2.5","name":"Kimi K2.5","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","thinkingFormat":"deepseek","supportsReasoningEffort":false},"reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":262144,"maxTokens":98304,"thinkingLevelMap":{"minimal":null,"low":null,"medium":null,"xhigh":null,"max":null},"inputLimits":{"images":{"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:kimi-k2.6":{"id":"kimi-k2.6","name":"Kimi K2.6","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","thinkingFormat":"deepseek","supportsReasoningEffort":false},"reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":262144,"maxTokens":262144,"thinkingLevelMap":{"minimal":null,"low":null,"medium":null,"xhigh":null,"max":null},"inputLimits":{"images":{"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:kimi-k2.7-code":{"id":"kimi-k2.7-code","name":"Kimi K2.7 Code","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","thinkingFormat":"deepseek","supportsReasoningEffort":false},"reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":262144,"maxTokens":262144,"thinkingLevelMap":{"minimal":null,"low":null,"medium":null,"xhigh":null,"max":null},"inputLimits":{"images":{"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:MiniMax-M2.5":{"id":"MiniMax-M2.5","name":"MiniMax-M2.5","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens"},"reasoning":true,"input":["text"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":196608,"maxTokens":32768,"type":"chat"},"chat:qwen3.6-flash":{"id":"qwen3.6-flash","name":"Qwen3.6 Flash","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","thinkingFormat":"qwen"},"reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":1000000,"maxTokens":65536,"inputLimits":{"images":{"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:qwen3.6-plus":{"id":"qwen3.6-plus","name":"Qwen3.6 Plus","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","thinkingFormat":"qwen"},"reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":1000000,"maxTokens":65536,"inputLimits":{"images":{"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:qwen3.7-max":{"id":"qwen3.7-max","name":"Qwen3.7 Max","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","thinkingFormat":"qwen"},"reasoning":true,"input":["text"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":1000000,"maxTokens":131072,"type":"chat"},"chat:qwen3.7-plus":{"id":"qwen3.7-plus","name":"Qwen3.7 Plus","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","thinkingFormat":"qwen"},"reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":1000000,"maxTokens":65536,"inputLimits":{"images":{"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:qwen3.8-flash":{"id":"qwen3.8-flash","name":"Qwen3.8 Flash","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","thinkingFormat":"qwen"},"reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":1000000,"maxTokens":131072,"inputLimits":{"images":{"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:qwen3.8-max":{"id":"qwen3.8-max","name":"Qwen3.8 Max","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","thinkingFormat":"qwen"},"reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":1000000,"maxTokens":131072,"inputLimits":{"images":{"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:qwen3.8-max-preview":{"id":"qwen3.8-max-preview","name":"Qwen3.8 Max Preview","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","thinkingFormat":"qwen"},"reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":1000000,"maxTokens":131072,"inputLimits":{"images":{"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"}}}
|
|
1
|
+
{"openai-completions":{"chat:deepseek-v3.2":{"id":"deepseek-v3.2","name":"DeepSeek V3.2","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","requiresReasoningContentOnAssistantMessages":true,"thinkingFormat":"deepseek"},"reasoning":true,"input":["text"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":131072,"maxTokens":65536,"type":"chat"},"chat:deepseek-v4-flash":{"id":"deepseek-v4-flash","name":"DeepSeek V4 Flash","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","requiresReasoningContentOnAssistantMessages":true,"thinkingFormat":"deepseek"},"reasoning":true,"input":["text"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":1000000,"maxTokens":384000,"thinkingLevelMap":{"minimal":null,"low":null,"medium":null,"high":"high","max":"max"},"type":"chat"},"chat:deepseek-v4-flash-0731":{"id":"deepseek-v4-flash-0731","name":"DeepSeek V4 Flash 0731","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","requiresReasoningContentOnAssistantMessages":true,"thinkingFormat":"deepseek"},"reasoning":true,"input":["text"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":1000000,"maxTokens":384000,"thinkingLevelMap":{"minimal":null,"low":null,"medium":null,"high":"high","max":"max"},"type":"chat"},"chat:deepseek-v4-pro":{"id":"deepseek-v4-pro","name":"DeepSeek V4 Pro","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","requiresReasoningContentOnAssistantMessages":true,"thinkingFormat":"deepseek"},"reasoning":true,"input":["text"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":1000000,"maxTokens":384000,"thinkingLevelMap":{"minimal":null,"low":null,"medium":null,"high":"high","max":"max"},"type":"chat"},"chat:deepseek-v4-pro-0813":{"id":"deepseek-v4-pro-0813","name":"DeepSeek V4 Pro 0813","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","requiresReasoningContentOnAssistantMessages":true,"thinkingFormat":"deepseek"},"reasoning":true,"input":["text"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":1000000,"maxTokens":384000,"thinkingLevelMap":{"minimal":null,"low":null,"medium":null,"high":"high","max":"max"},"type":"chat"},"chat:deepseek-v4.1-flash":{"id":"deepseek-v4.1-flash","name":"DeepSeek V4.1 Flash","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","requiresReasoningContentOnAssistantMessages":true,"thinkingFormat":"deepseek"},"reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":1000000,"maxTokens":384000,"thinkingLevelMap":{"minimal":null,"low":null,"medium":null,"high":"high","max":"max"},"inputLimits":{"images":{"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:deepseek-v4.1-flash-1017":{"id":"deepseek-v4.1-flash-1017","name":"DeepSeek V4.1 Flash 1017","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","requiresReasoningContentOnAssistantMessages":true,"thinkingFormat":"deepseek"},"reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":1000000,"maxTokens":384000,"thinkingLevelMap":{"minimal":null,"low":null,"medium":null,"high":"high","max":"max"},"inputLimits":{"images":{"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:glm-5":{"id":"glm-5","name":"GLM-5","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens"},"reasoning":true,"input":["text"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":202752,"maxTokens":16384,"type":"chat"},"chat:glm-5.1":{"id":"glm-5.1","name":"GLM-5.1","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens"},"reasoning":true,"input":["text"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":202752,"maxTokens":128000,"type":"chat"},"chat:glm-5.2":{"id":"glm-5.2","name":"GLM-5.2","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens"},"reasoning":true,"input":["text"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":1000000,"maxTokens":131072,"type":"chat"},"chat:glm-5.3":{"id":"glm-5.3","name":"GLM-5.3","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens"},"reasoning":true,"input":["text"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":1000000,"maxTokens":131072,"type":"chat"},"chat:kimi-k2.5":{"id":"kimi-k2.5","name":"Kimi K2.5","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","thinkingFormat":"deepseek","supportsReasoningEffort":false},"reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":262144,"maxTokens":98304,"thinkingLevelMap":{"minimal":null,"low":null,"medium":null,"xhigh":null,"max":null},"inputLimits":{"images":{"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:kimi-k2.6":{"id":"kimi-k2.6","name":"Kimi K2.6","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","thinkingFormat":"deepseek","supportsReasoningEffort":false},"reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":262144,"maxTokens":262144,"thinkingLevelMap":{"minimal":null,"low":null,"medium":null,"xhigh":null,"max":null},"inputLimits":{"images":{"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:kimi-k2.7-code":{"id":"kimi-k2.7-code","name":"Kimi K2.7 Code","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","thinkingFormat":"deepseek","supportsReasoningEffort":false},"reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":262144,"maxTokens":262144,"thinkingLevelMap":{"minimal":null,"low":null,"medium":null,"xhigh":null,"max":null},"inputLimits":{"images":{"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:MiniMax-M2.5":{"id":"MiniMax-M2.5","name":"MiniMax-M2.5","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens"},"reasoning":true,"input":["text"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":196608,"maxTokens":32768,"type":"chat"},"chat:qwen3.6-flash":{"id":"qwen3.6-flash","name":"Qwen3.6 Flash","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","thinkingFormat":"qwen"},"reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":1000000,"maxTokens":65536,"inputLimits":{"images":{"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:qwen3.6-plus":{"id":"qwen3.6-plus","name":"Qwen3.6 Plus","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","thinkingFormat":"qwen"},"reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":1000000,"maxTokens":65536,"inputLimits":{"images":{"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:qwen3.7-max":{"id":"qwen3.7-max","name":"Qwen3.7 Max","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","thinkingFormat":"qwen"},"reasoning":true,"input":["text"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":1000000,"maxTokens":131072,"type":"chat"},"chat:qwen3.7-plus":{"id":"qwen3.7-plus","name":"Qwen3.7 Plus","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","thinkingFormat":"qwen"},"reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":1000000,"maxTokens":65536,"inputLimits":{"images":{"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:qwen3.8-flash":{"id":"qwen3.8-flash","name":"Qwen3.8 Flash","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","thinkingFormat":"qwen"},"reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":1000000,"maxTokens":131072,"inputLimits":{"images":{"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:qwen3.8-max":{"id":"qwen3.8-max","name":"Qwen3.8 Max","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","thinkingFormat":"qwen"},"reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":1000000,"maxTokens":131072,"inputLimits":{"images":{"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"},"chat:qwen3.8-max-preview":{"id":"qwen3.8-max-preview","name":"Qwen3.8 Max Preview","api":"openai-completions","provider":"alibaba-token-plan","baseUrl":"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1","compat":{"supportsStrictMode":true,"supportsStore":false,"supportsDeveloperRole":false,"maxTokensField":"max_tokens","thinkingFormat":"qwen"},"reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":1000000,"maxTokens":131072,"inputLimits":{"images":{"resize":{"maxWidth":2000,"maxHeight":2000,"maxBytes":4718592,"jpegQuality":80}}},"type":"chat"}}}
|