@oh-my-pi/pi-catalog 16.3.0 → 16.3.3
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 +20 -0
- package/dist/types/compat/openai.d.ts +0 -2
- package/dist/types/provider-models/descriptors.d.ts +4 -1
- package/dist/types/types.d.ts +12 -10
- package/package.json +3 -3
- package/src/compat/anthropic.ts +71 -19
- package/src/compat/openai.ts +0 -4
- package/src/models.json +154 -61
- package/src/provider-models/descriptors.ts +4 -2
- package/src/provider-models/openai-compat.ts +35 -32
- package/src/types.ts +11 -10
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [16.3.3] - 2026-07-02
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Extended Anthropic-compatible signing-endpoint recognition to Cloudflare AI Gateway, Google Vertex, AWS Bedrock, and Azure AI Inference / Foundry to ensure consistent reasoning-replay and signature-stripping behavior, and exposed ResolvedAnthropicCompat.signingEndpoint in the public API.
|
|
10
|
+
- Fixed Zhipu Coding Plan runtime discovery to prioritize account-scoped model lists over bundled fallback models, preventing routing errors for valid non-z.ai keys.
|
|
11
|
+
|
|
12
|
+
## [16.3.2] - 2026-07-02
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- Fixed ZenMux model discovery to run without a `ZENMUX_API_KEY`, so newly published ZenMux models (for example `anthropic/claude-fable-5-free`) auto-update into the runtime `models.db` cache instead of waiting on a regenerated `models.json`.
|
|
17
|
+
- Fixed ZenMux runtime discovery to query the `/api/v1/models` endpoint even when the resolved provider base URL points at the Anthropic-compatible route, so discovery no longer requests a non-existent `/api/anthropic/models` path.
|
|
18
|
+
|
|
19
|
+
## [16.3.1] - 2026-07-02
|
|
20
|
+
|
|
21
|
+
### Removed
|
|
22
|
+
|
|
23
|
+
- Removed reasoning suppression prompt logic for GPT-5 models
|
|
24
|
+
|
|
5
25
|
## [16.3.0] - 2026-07-02
|
|
6
26
|
|
|
7
27
|
### Breaking Changes
|
|
@@ -20,8 +20,6 @@ interface OpenAIResponsesSpecLike {
|
|
|
20
20
|
* as well as URL — bundled `azure` models carry no baseUrl (the deployment host
|
|
21
21
|
* is per-resource, resolved at runtime) — while OpenAI/Copilot developer-role
|
|
22
22
|
* and prompt-cache detection stay URL-keyed, as the historical call sites were.
|
|
23
|
-
* The GPT-5 reasoning-suppression prompt keys on the model name, matching the
|
|
24
|
-
* historical request-time check.
|
|
25
23
|
*/
|
|
26
24
|
export declare function buildOpenAIResponsesCompat(spec: OpenAIResponsesSpecLike): ResolvedOpenAIResponsesCompat;
|
|
27
25
|
export declare function buildOpenRouterCompat(spec: ModelSpec<"openrouter">): ResolvedOpenRouterCompat;
|
|
@@ -407,14 +407,17 @@ export declare const CATALOG_PROVIDERS: readonly [{
|
|
|
407
407
|
readonly defaultModel: "anthropic/claude-opus-4.8";
|
|
408
408
|
readonly envVars: readonly ["ZENMUX_API_KEY"];
|
|
409
409
|
readonly createModelManagerOptions: (config: ModelManagerConfig) => import("..").ModelManagerOptions<import("..").Api, unknown>;
|
|
410
|
+
readonly allowUnauthenticated: true;
|
|
410
411
|
readonly catalogDiscovery: {
|
|
411
412
|
readonly label: "ZenMux";
|
|
413
|
+
readonly allowUnauthenticated: true;
|
|
412
414
|
};
|
|
413
415
|
}, {
|
|
414
416
|
readonly id: "zhipu-coding-plan";
|
|
415
|
-
readonly defaultModel: "glm-5.
|
|
417
|
+
readonly defaultModel: "glm-5.1";
|
|
416
418
|
readonly envVars: readonly ["ZHIPU_API_KEY"];
|
|
417
419
|
readonly createModelManagerOptions: (config: ModelManagerConfig) => import("..").ModelManagerOptions<"openai-completions", unknown>;
|
|
420
|
+
readonly dynamicModelsAuthoritative: true;
|
|
418
421
|
readonly catalogDiscovery: {
|
|
419
422
|
readonly label: "Zhipu Coding Plan";
|
|
420
423
|
};
|
package/dist/types/types.d.ts
CHANGED
|
@@ -286,14 +286,6 @@ export interface OpenAICompat {
|
|
|
286
286
|
strictResponsesPairing?: boolean;
|
|
287
287
|
/** Whether the Responses API accepts the `detail: "original"` image hint. Default: auto-detected (false for GitHub Copilot, which rejects it with a 400). */
|
|
288
288
|
supportsImageDetailOriginal?: boolean;
|
|
289
|
-
/**
|
|
290
|
-
* Append a trailing no-reasoning developer item when the caller did not
|
|
291
|
-
* request reasoning, suppressing default reasoning on models that cannot
|
|
292
|
-
* disable it via request params (Responses APIs only; see
|
|
293
|
-
* https://community.openai.com/t/need-reasoning-false-option-for-gpt-5/1351588/7).
|
|
294
|
-
* The prompt must not look like an execution or tool budget. Default: auto-detected (GPT-5-family model names).
|
|
295
|
-
*/
|
|
296
|
-
requiresReasoningSuppressionPrompt?: boolean;
|
|
297
289
|
/** Whether streamed reasoning deltas for the same field may repeat the full cumulative text snapshot. Default: false. */
|
|
298
290
|
reasoningDeltasMayBeCumulative?: boolean;
|
|
299
291
|
/** Strip leaked DeepSeek chat-template special tokens from visible content deltas. Default: auto-detected. */
|
|
@@ -463,7 +455,7 @@ export interface ResolvedOpenAISharedCompat {
|
|
|
463
455
|
* `buildModel`; request handlers read fields and never detect, resolve, or
|
|
464
456
|
* allocate.
|
|
465
457
|
*/
|
|
466
|
-
export type ResolvedOpenAICompat = ResolvedOpenAISharedCompat & Required<Omit<OpenAICompat, "supportsDeveloperRole" | "supportsReasoningEffort" | "reasoningEffortMap" | "supportsReasoningParams" | "thinkingFormat" | "reasoningDisableMode" | "omitReasoningEffort" | "includeEncryptedReasoning" | "filterReasoningHistory" | "disableReasoningOnForcedToolChoice" | "disableReasoningOnToolChoice" | "supportsToolChoice" | "supportsForcedToolChoice" | "supportsNamedToolChoice" | "reasoningContentField" | "requiresReasoningContentForToolCalls" | "requiresReasoningContentForAllAssistantTurns" | "allowsSyntheticReasoningContentForToolCalls" | "replayReasoningContent" | "qwenPreserveThinking" | "requiresThinkingAsText" | "requiresMistralToolIds" | "requiresToolResultName" | "requiresAssistantAfterToolResult" | "requiresAssistantContentForToolCalls" | "stripDeepseekSpecialTokens" | "streamMarkupHealingPattern" | "reasoningDeltasMayBeCumulative" | "emptyLengthFinishIsContextError" | "usesOpenAIToolCallIdLimit" | "promptCacheSessionHeader" | "openRouterRouting" | "isOpenRouterHost" | "supportsStrictMode" | "supportsLongPromptCacheRetention" | "alwaysSendMaxTokens" | "wireModelIdMode" | "vercelGatewayRouting" | "extraBody" | "toolStrictMode" | "toolSchemaFlavor" | "streamIdleTimeoutMs" | "cacheControlFormat" | "thinkingKeep" | "strictResponsesPairing" | "supportsImageDetailOriginal" | "
|
|
458
|
+
export type ResolvedOpenAICompat = ResolvedOpenAISharedCompat & Required<Omit<OpenAICompat, "supportsDeveloperRole" | "supportsReasoningEffort" | "reasoningEffortMap" | "supportsReasoningParams" | "thinkingFormat" | "reasoningDisableMode" | "omitReasoningEffort" | "includeEncryptedReasoning" | "filterReasoningHistory" | "disableReasoningOnForcedToolChoice" | "disableReasoningOnToolChoice" | "supportsToolChoice" | "supportsForcedToolChoice" | "supportsNamedToolChoice" | "reasoningContentField" | "requiresReasoningContentForToolCalls" | "requiresReasoningContentForAllAssistantTurns" | "allowsSyntheticReasoningContentForToolCalls" | "replayReasoningContent" | "qwenPreserveThinking" | "requiresThinkingAsText" | "requiresMistralToolIds" | "requiresToolResultName" | "requiresAssistantAfterToolResult" | "requiresAssistantContentForToolCalls" | "stripDeepseekSpecialTokens" | "streamMarkupHealingPattern" | "reasoningDeltasMayBeCumulative" | "emptyLengthFinishIsContextError" | "usesOpenAIToolCallIdLimit" | "promptCacheSessionHeader" | "openRouterRouting" | "isOpenRouterHost" | "supportsStrictMode" | "supportsLongPromptCacheRetention" | "alwaysSendMaxTokens" | "wireModelIdMode" | "vercelGatewayRouting" | "extraBody" | "toolStrictMode" | "toolSchemaFlavor" | "streamIdleTimeoutMs" | "cacheControlFormat" | "thinkingKeep" | "strictResponsesPairing" | "supportsImageDetailOriginal" | "enableGeminiThinkingLoopGuard" | "whenThinking">> & {
|
|
467
459
|
vercelGatewayRouting?: OpenAICompat["vercelGatewayRouting"];
|
|
468
460
|
extraBody?: OpenAICompat["extraBody"];
|
|
469
461
|
cacheControlFormat?: OpenAICompat["cacheControlFormat"];
|
|
@@ -482,7 +474,6 @@ export interface ResolvedOpenAIResponsesCompat extends ResolvedOpenAISharedCompa
|
|
|
482
474
|
supportsLongPromptCacheRetention: boolean;
|
|
483
475
|
strictResponsesPairing: boolean;
|
|
484
476
|
supportsImageDetailOriginal: boolean;
|
|
485
|
-
requiresReasoningSuppressionPrompt: boolean;
|
|
486
477
|
supportsObfuscationOptOut: boolean;
|
|
487
478
|
streamIdleTimeoutMs?: number;
|
|
488
479
|
}
|
|
@@ -501,6 +492,17 @@ export type ResolvedAnthropicCompat = Required<AnthropicCompat> & {
|
|
|
501
492
|
* env headers, and cache-TTL shaping without per-request URL parsing.
|
|
502
493
|
*/
|
|
503
494
|
officialEndpoint: boolean;
|
|
495
|
+
/**
|
|
496
|
+
* The configured endpoint enforces Anthropic's signature protocol on
|
|
497
|
+
* replayed thinking blocks — either the official API itself or a proxy
|
|
498
|
+
* that forwards to it (GitHub Copilot, ZenMux, Cloudflare AI Gateway's
|
|
499
|
+
* `/anthropic` route, Google Vertex's `publishers/anthropic/…`).
|
|
500
|
+
* Downstream transforms strip stale cross-model thinking signatures on
|
|
501
|
+
* these endpoints so the signing proxy doesn't 400 with
|
|
502
|
+
* `Invalid signature in thinking block` (#4297). Superset of
|
|
503
|
+
* {@link officialEndpoint}.
|
|
504
|
+
*/
|
|
505
|
+
signingEndpoint: boolean;
|
|
504
506
|
};
|
|
505
507
|
/**
|
|
506
508
|
* Compatibility settings for the devin-agent (Codeium Cascade) API. Cascade
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-catalog",
|
|
4
|
-
"version": "16.3.
|
|
4
|
+
"version": "16.3.3",
|
|
5
5
|
"description": "Model catalog for omp: bundled model database, provider discovery descriptors, model identity, classification, and equivalence",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@bufbuild/protobuf": "^2.12.0",
|
|
37
|
-
"@oh-my-pi/pi-utils": "16.3.
|
|
37
|
+
"@oh-my-pi/pi-utils": "16.3.3",
|
|
38
38
|
"arktype": "^2.2.0",
|
|
39
39
|
"zod": "^4"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@oh-my-pi/pi-ai": "16.3.
|
|
42
|
+
"@oh-my-pi/pi-ai": "16.3.3",
|
|
43
43
|
"@types/bun": "^1.3.14"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
package/src/compat/anthropic.ts
CHANGED
|
@@ -36,6 +36,52 @@ function matchesKimiK27CodeFamily(spec: ModelSpec<"anthropic-messages">): boolea
|
|
|
36
36
|
return spec.id === "kimi-for-coding" && /k2\.?7 code/i.test(spec.name ?? "");
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
const CLOUDFLARE_ANTHROPIC_GATEWAY_URL_MARKER = /gateway\.ai\.cloudflare\.com\/.+\/anthropic(?:\/|$)/i;
|
|
40
|
+
const VERTEX_ANTHROPIC_URL_MARKER = /aiplatform\.googleapis\.com\/.+\/publishers\/anthropic\//i;
|
|
41
|
+
const BEDROCK_ANTHROPIC_URL_MARKER = /(?:^|\/\/|\.)bedrock-runtime\.[a-z0-9-]+\.amazonaws\.com/i;
|
|
42
|
+
const AZURE_ANTHROPIC_URL_MARKER = /(?:^|\/\/|\.)[a-z0-9-]+\.(?:inference|services)\.ai\.azure\.com/i;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Cloudflare AI Gateway's `/anthropic` route forwards to signature-enforcing
|
|
46
|
+
* Anthropic (same failure class as GitHub Copilot #2851 / ZenMux #4192).
|
|
47
|
+
* Detection is by baseUrl marker rather than provider id: users routinely
|
|
48
|
+
* declare `provider: "custom"` (or other free-form ids) in `models.yml` for
|
|
49
|
+
* their own Cloudflare gateway account.
|
|
50
|
+
*/
|
|
51
|
+
function isCloudflareAnthropicGateway(baseUrl?: string): boolean {
|
|
52
|
+
return baseUrl !== undefined && CLOUDFLARE_ANTHROPIC_GATEWAY_URL_MARKER.test(baseUrl);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Google Vertex's `publishers/anthropic/models/…:streamRawPredict` route
|
|
57
|
+
* proxies Claude through Google's identity layer and returns full thinking
|
|
58
|
+
* signatures, so it is a SIGNING endpoint.
|
|
59
|
+
*/
|
|
60
|
+
function isVertexAnthropicRoute(baseUrl?: string): boolean {
|
|
61
|
+
return baseUrl !== undefined && VERTEX_ANTHROPIC_URL_MARKER.test(baseUrl);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* AWS Bedrock's Anthropic route (`bedrock-runtime.<region>.amazonaws.com`)
|
|
66
|
+
* forwards Claude requests through Anthropic's signature protocol. Users can
|
|
67
|
+
* front Bedrock with a custom `anthropic-messages` provider entry in
|
|
68
|
+
* `models.yml`; the URL marker makes those signing by default without
|
|
69
|
+
* requiring a provider-id list.
|
|
70
|
+
*/
|
|
71
|
+
function isBedrockAnthropicRoute(baseUrl?: string): boolean {
|
|
72
|
+
return baseUrl !== undefined && BEDROCK_ANTHROPIC_URL_MARKER.test(baseUrl);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Azure AI Inference / Foundry Anthropic route
|
|
77
|
+
* (`<resource>.inference.ai.azure.com`, `<resource>.services.ai.azure.com`).
|
|
78
|
+
* Fronts Claude behind Azure identity and enforces Anthropic signatures on
|
|
79
|
+
* replay.
|
|
80
|
+
*/
|
|
81
|
+
function isAzureAnthropicRoute(baseUrl?: string): boolean {
|
|
82
|
+
return baseUrl !== undefined && AZURE_ANTHROPIC_URL_MARKER.test(baseUrl);
|
|
83
|
+
}
|
|
84
|
+
|
|
39
85
|
/** Build the resolved anthropic-messages compat record for a model spec. */
|
|
40
86
|
export function buildAnthropicCompat(spec: ModelSpec<"anthropic-messages">): ResolvedAnthropicCompat {
|
|
41
87
|
const baseUrl = spec.baseUrl;
|
|
@@ -53,8 +99,17 @@ export function buildAnthropicCompat(spec: ModelSpec<"anthropic-messages">): Res
|
|
|
53
99
|
// (issue #4192).
|
|
54
100
|
const isZenmux = modelMatchesHost(spec, "zenmux");
|
|
55
101
|
const requiresThinkingEnabled = modelMatchesHost(spec, "moonshotNative") && matchesKimiK27CodeFamily(spec);
|
|
102
|
+
const signingEndpoint =
|
|
103
|
+
official ||
|
|
104
|
+
isCopilot ||
|
|
105
|
+
isZenmux ||
|
|
106
|
+
isCloudflareAnthropicGateway(baseUrl) ||
|
|
107
|
+
isVertexAnthropicRoute(baseUrl) ||
|
|
108
|
+
isBedrockAnthropicRoute(baseUrl) ||
|
|
109
|
+
isAzureAnthropicRoute(baseUrl);
|
|
56
110
|
const compat: ResolvedAnthropicCompat = {
|
|
57
111
|
officialEndpoint: official,
|
|
112
|
+
signingEndpoint,
|
|
58
113
|
disableStrictTools: false,
|
|
59
114
|
disableAdaptiveThinking: false,
|
|
60
115
|
supportsEagerToolInputStreaming: !isCopilot,
|
|
@@ -73,26 +128,23 @@ export function buildAnthropicCompat(spec: ModelSpec<"anthropic-messages">): Res
|
|
|
73
128
|
// into a class that reads `.id`.
|
|
74
129
|
requiresToolResultId: isZai,
|
|
75
130
|
requiresThinkingEnabled,
|
|
76
|
-
// Official Anthropic
|
|
77
|
-
//
|
|
78
|
-
//
|
|
79
|
-
//
|
|
80
|
-
//
|
|
81
|
-
// arguments (#2005
|
|
82
|
-
//
|
|
131
|
+
// Official Anthropic and Anthropic-compatible signing proxies enforce
|
|
132
|
+
// signature-based thinking-chain integrity, so unsigned thinking blocks
|
|
133
|
+
// must stay text there. Every other `anthropic-messages` reasoning
|
|
134
|
+
// endpoint replays unsigned thinking natively so the reasoning chain
|
|
135
|
+
// survives continuation and doesn't destabilize the next tool-call
|
|
136
|
+
// arguments (#2005, #2257, #2265, #3288, #3433, #3434). Opaque custom
|
|
137
|
+
// signing proxies remain the reporter's responsibility to mark with
|
|
138
|
+
// `compat.replayUnsignedThinking: false`; the transport surfaces a
|
|
139
|
+
// pointed remediation the first time the signing 400 fires (#4297).
|
|
83
140
|
//
|
|
84
|
-
//
|
|
85
|
-
//
|
|
86
|
-
//
|
|
87
|
-
//
|
|
88
|
-
//
|
|
89
|
-
//
|
|
90
|
-
|
|
91
|
-
// blocks to text instead, which the API accepts.
|
|
92
|
-
replayUnsignedThinking:
|
|
93
|
-
!isCopilot &&
|
|
94
|
-
!isZenmux &&
|
|
95
|
-
(isZai || modelMatchesHost(spec, "deepseekFamily") || (spec.reasoning && !official)),
|
|
141
|
+
// Known signing Anthropic-messages hosts (Copilot, ZenMux, Cloudflare
|
|
142
|
+
// AI Gateway `/anthropic`, Google Vertex `publishers/anthropic`, AWS
|
|
143
|
+
// Bedrock `bedrock-runtime.<region>.amazonaws.com`, and Azure
|
|
144
|
+
// AI Inference / Foundry `<res>.(inference|services).ai.azure.com`)
|
|
145
|
+
// are excluded automatically because they can be recognised by provider
|
|
146
|
+
// id or baseUrl marker.
|
|
147
|
+
replayUnsignedThinking: !signingEndpoint && (Boolean(spec.reasoning) || modelMatchesHost(spec, "deepseekFamily")),
|
|
96
148
|
escapeBuiltinToolNames: modelMatchesHost(spec, "umans"),
|
|
97
149
|
};
|
|
98
150
|
applyCompatOverrides(compat, spec.compat);
|
package/src/compat/openai.ts
CHANGED
|
@@ -593,8 +593,6 @@ interface OpenAIResponsesSpecLike {
|
|
|
593
593
|
* as well as URL — bundled `azure` models carry no baseUrl (the deployment host
|
|
594
594
|
* is per-resource, resolved at runtime) — while OpenAI/Copilot developer-role
|
|
595
595
|
* and prompt-cache detection stay URL-keyed, as the historical call sites were.
|
|
596
|
-
* The GPT-5 reasoning-suppression prompt keys on the model name, matching the
|
|
597
|
-
* historical request-time check.
|
|
598
596
|
*/
|
|
599
597
|
export function buildOpenAIResponsesCompat(spec: OpenAIResponsesSpecLike): ResolvedOpenAIResponsesCompat {
|
|
600
598
|
const baseUrl = spec.baseUrl ?? "";
|
|
@@ -626,7 +624,6 @@ export function buildOpenAIResponsesCompat(spec: OpenAIResponsesSpecLike): Resol
|
|
|
626
624
|
// or base-URL host (mirroring the Anthropic compat builder) so a model
|
|
627
625
|
// pointed at the Copilot host under a different provider id still clamps.
|
|
628
626
|
supportsImageDetailOriginal: !modelMatchesHost({ provider: spec.provider, baseUrl }, "githubCopilot"),
|
|
629
|
-
requiresReasoningSuppressionPrompt: spec.name.toLowerCase().startsWith("gpt-5"),
|
|
630
627
|
reasoningEffortMap: {},
|
|
631
628
|
supportsReasoningParams: true,
|
|
632
629
|
thinkingFormat,
|
|
@@ -693,7 +690,6 @@ function pickResponsesOnly(compat: ResolvedOpenAIResponsesCompat): ResponsesOnly
|
|
|
693
690
|
supportsLongPromptCacheRetention: compat.supportsLongPromptCacheRetention,
|
|
694
691
|
strictResponsesPairing: compat.strictResponsesPairing,
|
|
695
692
|
supportsImageDetailOriginal: compat.supportsImageDetailOriginal,
|
|
696
|
-
requiresReasoningSuppressionPrompt: compat.requiresReasoningSuppressionPrompt,
|
|
697
693
|
supportsObfuscationOptOut: compat.supportsObfuscationOptOut,
|
|
698
694
|
} satisfies ResponsesOnlyCompat;
|
|
699
695
|
}
|
package/src/models.json
CHANGED
|
@@ -8330,10 +8330,10 @@
|
|
|
8330
8330
|
"image"
|
|
8331
8331
|
],
|
|
8332
8332
|
"cost": {
|
|
8333
|
-
"input":
|
|
8334
|
-
"output":
|
|
8335
|
-
"cacheRead": 1
|
|
8336
|
-
"cacheWrite":
|
|
8333
|
+
"input": 10,
|
|
8334
|
+
"output": 50,
|
|
8335
|
+
"cacheRead": 1,
|
|
8336
|
+
"cacheWrite": 12.5
|
|
8337
8337
|
},
|
|
8338
8338
|
"contextWindow": 1000000,
|
|
8339
8339
|
"maxTokens": 128000,
|
|
@@ -12658,23 +12658,33 @@
|
|
|
12658
12658
|
"cerebras": {
|
|
12659
12659
|
"gemma-4-31b": {
|
|
12660
12660
|
"id": "gemma-4-31b",
|
|
12661
|
-
"name": "
|
|
12661
|
+
"name": "Gemma 4 31B IT",
|
|
12662
12662
|
"api": "openai-completions",
|
|
12663
12663
|
"provider": "cerebras",
|
|
12664
12664
|
"baseUrl": "https://api.cerebras.ai/v1",
|
|
12665
|
-
"reasoning":
|
|
12665
|
+
"reasoning": true,
|
|
12666
12666
|
"input": [
|
|
12667
12667
|
"text",
|
|
12668
12668
|
"image"
|
|
12669
12669
|
],
|
|
12670
12670
|
"cost": {
|
|
12671
|
-
"input": 0,
|
|
12672
|
-
"output":
|
|
12671
|
+
"input": 0.99,
|
|
12672
|
+
"output": 1.49,
|
|
12673
12673
|
"cacheRead": 0,
|
|
12674
12674
|
"cacheWrite": 0
|
|
12675
12675
|
},
|
|
12676
|
-
"contextWindow":
|
|
12677
|
-
"maxTokens":
|
|
12676
|
+
"contextWindow": 131072,
|
|
12677
|
+
"maxTokens": 40960,
|
|
12678
|
+
"thinking": {
|
|
12679
|
+
"mode": "effort",
|
|
12680
|
+
"efforts": [
|
|
12681
|
+
"minimal",
|
|
12682
|
+
"low",
|
|
12683
|
+
"medium",
|
|
12684
|
+
"high",
|
|
12685
|
+
"xhigh"
|
|
12686
|
+
]
|
|
12687
|
+
}
|
|
12678
12688
|
},
|
|
12679
12689
|
"gpt-oss-120b": {
|
|
12680
12690
|
"id": "gpt-oss-120b",
|
|
@@ -17558,7 +17568,7 @@
|
|
|
17558
17568
|
},
|
|
17559
17569
|
"minimax-m3": {
|
|
17560
17570
|
"id": "minimax-m3",
|
|
17561
|
-
"name": "MiniMax-M3
|
|
17571
|
+
"name": "MiniMax-M3",
|
|
17562
17572
|
"api": "openai-completions",
|
|
17563
17573
|
"provider": "fireworks",
|
|
17564
17574
|
"baseUrl": "https://api.fireworks.ai/inference/v1",
|
|
@@ -18096,6 +18106,48 @@
|
|
|
18096
18106
|
}
|
|
18097
18107
|
}
|
|
18098
18108
|
},
|
|
18109
|
+
"claude-sonnet-5": {
|
|
18110
|
+
"id": "claude-sonnet-5",
|
|
18111
|
+
"name": "Claude Sonnet 5",
|
|
18112
|
+
"api": "anthropic-messages",
|
|
18113
|
+
"provider": "github-copilot",
|
|
18114
|
+
"baseUrl": "https://api.githubcopilot.com",
|
|
18115
|
+
"reasoning": true,
|
|
18116
|
+
"input": [
|
|
18117
|
+
"text",
|
|
18118
|
+
"image"
|
|
18119
|
+
],
|
|
18120
|
+
"cost": {
|
|
18121
|
+
"input": 2,
|
|
18122
|
+
"output": 10,
|
|
18123
|
+
"cacheRead": 0.2,
|
|
18124
|
+
"cacheWrite": 2.5
|
|
18125
|
+
},
|
|
18126
|
+
"contextWindow": 1000000,
|
|
18127
|
+
"maxTokens": 128000,
|
|
18128
|
+
"headers": {
|
|
18129
|
+
"User-Agent": "opencode/1.3.15",
|
|
18130
|
+
"X-GitHub-Api-Version": "2026-06-01"
|
|
18131
|
+
},
|
|
18132
|
+
"thinking": {
|
|
18133
|
+
"mode": "anthropic-adaptive",
|
|
18134
|
+
"efforts": [
|
|
18135
|
+
"minimal",
|
|
18136
|
+
"low",
|
|
18137
|
+
"medium",
|
|
18138
|
+
"high",
|
|
18139
|
+
"xhigh"
|
|
18140
|
+
],
|
|
18141
|
+
"effortMap": {
|
|
18142
|
+
"minimal": "low",
|
|
18143
|
+
"low": "medium",
|
|
18144
|
+
"medium": "high",
|
|
18145
|
+
"high": "xhigh",
|
|
18146
|
+
"xhigh": "max"
|
|
18147
|
+
},
|
|
18148
|
+
"supportsDisplay": true
|
|
18149
|
+
}
|
|
18150
|
+
},
|
|
18099
18151
|
"gemini-2.5-pro": {
|
|
18100
18152
|
"id": "gemini-2.5-pro",
|
|
18101
18153
|
"name": "Gemini 2.5 Pro",
|
|
@@ -20148,7 +20200,7 @@
|
|
|
20148
20200
|
},
|
|
20149
20201
|
"gemma-4-31b": {
|
|
20150
20202
|
"id": "gemma-4-31b",
|
|
20151
|
-
"name": "Gemma 4 31B",
|
|
20203
|
+
"name": "Gemma 4 31B IT",
|
|
20152
20204
|
"api": "google-generative-ai",
|
|
20153
20205
|
"provider": "google",
|
|
20154
20206
|
"baseUrl": "https://generativelanguage.googleapis.com/v1beta",
|
|
@@ -60067,7 +60119,7 @@
|
|
|
60067
60119
|
},
|
|
60068
60120
|
"minimax-m3": {
|
|
60069
60121
|
"id": "minimax-m3",
|
|
60070
|
-
"name": "MiniMax-M3
|
|
60122
|
+
"name": "MiniMax-M3",
|
|
60071
60123
|
"api": "openai-completions",
|
|
60072
60124
|
"provider": "opencode-go",
|
|
60073
60125
|
"baseUrl": "https://opencode.ai/zen/go/v1",
|
|
@@ -63775,8 +63827,8 @@
|
|
|
63775
63827
|
"text"
|
|
63776
63828
|
],
|
|
63777
63829
|
"cost": {
|
|
63778
|
-
"input": 0.
|
|
63779
|
-
"output": 0.
|
|
63830
|
+
"input": 0.24,
|
|
63831
|
+
"output": 0.8999999999999999,
|
|
63780
63832
|
"cacheRead": 0.135,
|
|
63781
63833
|
"cacheWrite": 0
|
|
63782
63834
|
},
|
|
@@ -64032,9 +64084,9 @@
|
|
|
64032
64084
|
"text"
|
|
64033
64085
|
],
|
|
64034
64086
|
"cost": {
|
|
64035
|
-
"input": 0.
|
|
64036
|
-
"output": 0.
|
|
64037
|
-
"cacheRead": 0.
|
|
64087
|
+
"input": 0.08900000000000001,
|
|
64088
|
+
"output": 0.18,
|
|
64089
|
+
"cacheRead": 0.018,
|
|
64038
64090
|
"cacheWrite": 0
|
|
64039
64091
|
},
|
|
64040
64092
|
"contextWindow": 1048576,
|
|
@@ -65283,12 +65335,12 @@
|
|
|
65283
65335
|
],
|
|
65284
65336
|
"cost": {
|
|
65285
65337
|
"input": 0.255,
|
|
65286
|
-
"output": 1,
|
|
65338
|
+
"output": 1.02,
|
|
65287
65339
|
"cacheRead": 0.03,
|
|
65288
65340
|
"cacheWrite": 0
|
|
65289
65341
|
},
|
|
65290
65342
|
"contextWindow": 204800,
|
|
65291
|
-
"maxTokens":
|
|
65343
|
+
"maxTokens": 131072,
|
|
65292
65344
|
"thinking": {
|
|
65293
65345
|
"mode": "effort",
|
|
65294
65346
|
"efforts": [
|
|
@@ -65310,13 +65362,13 @@
|
|
|
65310
65362
|
"text"
|
|
65311
65363
|
],
|
|
65312
65364
|
"cost": {
|
|
65313
|
-
"input": 0.
|
|
65314
|
-
"output":
|
|
65365
|
+
"input": 0.3,
|
|
65366
|
+
"output": 1.2,
|
|
65315
65367
|
"cacheRead": 0.03,
|
|
65316
65368
|
"cacheWrite": 0
|
|
65317
65369
|
},
|
|
65318
65370
|
"contextWindow": 204800,
|
|
65319
|
-
"maxTokens":
|
|
65371
|
+
"maxTokens": 131072,
|
|
65320
65372
|
"thinking": {
|
|
65321
65373
|
"mode": "effort",
|
|
65322
65374
|
"efforts": [
|
|
@@ -66037,11 +66089,11 @@
|
|
|
66037
66089
|
"cost": {
|
|
66038
66090
|
"input": 0.6,
|
|
66039
66091
|
"output": 2.5,
|
|
66040
|
-
"cacheRead": 0.
|
|
66092
|
+
"cacheRead": 0.15,
|
|
66041
66093
|
"cacheWrite": 0
|
|
66042
66094
|
},
|
|
66043
66095
|
"contextWindow": 262144,
|
|
66044
|
-
"maxTokens":
|
|
66096
|
+
"maxTokens": 100352,
|
|
66045
66097
|
"thinking": {
|
|
66046
66098
|
"mode": "effort",
|
|
66047
66099
|
"efforts": [
|
|
@@ -68788,13 +68840,13 @@
|
|
|
68788
68840
|
"text"
|
|
68789
68841
|
],
|
|
68790
68842
|
"cost": {
|
|
68791
|
-
"input": 0.
|
|
68792
|
-
"output":
|
|
68843
|
+
"input": 0.13,
|
|
68844
|
+
"output": 1.56,
|
|
68793
68845
|
"cacheRead": 0.08,
|
|
68794
68846
|
"cacheWrite": 0
|
|
68795
68847
|
},
|
|
68796
68848
|
"contextWindow": 131072,
|
|
68797
|
-
"maxTokens":
|
|
68849
|
+
"maxTokens": 32768,
|
|
68798
68850
|
"thinking": {
|
|
68799
68851
|
"mode": "effort",
|
|
68800
68852
|
"efforts": [
|
|
@@ -68901,8 +68953,8 @@
|
|
|
68901
68953
|
"text"
|
|
68902
68954
|
],
|
|
68903
68955
|
"cost": {
|
|
68904
|
-
"input": 0.
|
|
68905
|
-
"output": 0.
|
|
68956
|
+
"input": 0.117,
|
|
68957
|
+
"output": 0.45499999999999996,
|
|
68906
68958
|
"cacheRead": 0.049999999999999996,
|
|
68907
68959
|
"cacheWrite": 0
|
|
68908
68960
|
},
|
|
@@ -71329,7 +71381,7 @@
|
|
|
71329
71381
|
"synthetic": {
|
|
71330
71382
|
"hf:MiniMaxAI/MiniMax-M3": {
|
|
71331
71383
|
"id": "hf:MiniMaxAI/MiniMax-M3",
|
|
71332
|
-
"name": "
|
|
71384
|
+
"name": "MiniMax-M3",
|
|
71333
71385
|
"api": "openai-completions",
|
|
71334
71386
|
"provider": "synthetic",
|
|
71335
71387
|
"baseUrl": "https://api.synthetic.new/openai/v1",
|
|
@@ -71344,7 +71396,7 @@
|
|
|
71344
71396
|
"cacheRead": 0.6,
|
|
71345
71397
|
"cacheWrite": 0
|
|
71346
71398
|
},
|
|
71347
|
-
"contextWindow":
|
|
71399
|
+
"contextWindow": 524288,
|
|
71348
71400
|
"maxTokens": 65536,
|
|
71349
71401
|
"thinking": {
|
|
71350
71402
|
"mode": "effort",
|
|
@@ -71389,26 +71441,37 @@
|
|
|
71389
71441
|
},
|
|
71390
71442
|
"hf:moonshotai/Kimi-K2.7-Code": {
|
|
71391
71443
|
"id": "hf:moonshotai/Kimi-K2.7-Code",
|
|
71392
|
-
"name": "
|
|
71444
|
+
"name": "Kimi K2.7 Code",
|
|
71393
71445
|
"api": "openai-completions",
|
|
71394
71446
|
"provider": "synthetic",
|
|
71395
71447
|
"baseUrl": "https://api.synthetic.new/openai/v1",
|
|
71396
|
-
"reasoning":
|
|
71448
|
+
"reasoning": true,
|
|
71397
71449
|
"input": [
|
|
71398
|
-
"text"
|
|
71450
|
+
"text",
|
|
71451
|
+
"image"
|
|
71399
71452
|
],
|
|
71400
71453
|
"cost": {
|
|
71401
|
-
"input": 0,
|
|
71402
|
-
"output":
|
|
71403
|
-
"cacheRead": 0,
|
|
71454
|
+
"input": 0.95,
|
|
71455
|
+
"output": 4,
|
|
71456
|
+
"cacheRead": 0.95,
|
|
71404
71457
|
"cacheWrite": 0
|
|
71405
71458
|
},
|
|
71406
71459
|
"contextWindow": 262144,
|
|
71407
|
-
"maxTokens":
|
|
71460
|
+
"maxTokens": 65536,
|
|
71461
|
+
"thinking": {
|
|
71462
|
+
"mode": "effort",
|
|
71463
|
+
"efforts": [
|
|
71464
|
+
"minimal",
|
|
71465
|
+
"low",
|
|
71466
|
+
"medium",
|
|
71467
|
+
"high",
|
|
71468
|
+
"xhigh"
|
|
71469
|
+
]
|
|
71470
|
+
}
|
|
71408
71471
|
},
|
|
71409
71472
|
"hf:nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4": {
|
|
71410
71473
|
"id": "hf:nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4",
|
|
71411
|
-
"name": "
|
|
71474
|
+
"name": "Nemotron 3 Super 120B A12B",
|
|
71412
71475
|
"api": "openai-completions",
|
|
71413
71476
|
"provider": "synthetic",
|
|
71414
71477
|
"baseUrl": "https://api.synthetic.new/openai/v1",
|
|
@@ -71437,7 +71500,7 @@
|
|
|
71437
71500
|
},
|
|
71438
71501
|
"hf:openai/gpt-oss-120b": {
|
|
71439
71502
|
"id": "hf:openai/gpt-oss-120b",
|
|
71440
|
-
"name": "
|
|
71503
|
+
"name": "GPT OSS 120B",
|
|
71441
71504
|
"api": "openai-completions",
|
|
71442
71505
|
"provider": "synthetic",
|
|
71443
71506
|
"baseUrl": "https://api.synthetic.new/openai/v1",
|
|
@@ -71464,7 +71527,7 @@
|
|
|
71464
71527
|
},
|
|
71465
71528
|
"hf:Qwen/Qwen3.6-27B": {
|
|
71466
71529
|
"id": "hf:Qwen/Qwen3.6-27B",
|
|
71467
|
-
"name": "
|
|
71530
|
+
"name": "Qwen3.6 27B",
|
|
71468
71531
|
"api": "openai-completions",
|
|
71469
71532
|
"provider": "synthetic",
|
|
71470
71533
|
"baseUrl": "https://api.synthetic.new/openai/v1",
|
|
@@ -71493,7 +71556,7 @@
|
|
|
71493
71556
|
},
|
|
71494
71557
|
"hf:zai-org/GLM-4.7-Flash": {
|
|
71495
71558
|
"id": "hf:zai-org/GLM-4.7-Flash",
|
|
71496
|
-
"name": "
|
|
71559
|
+
"name": "GLM-4.7-Flash",
|
|
71497
71560
|
"api": "openai-completions",
|
|
71498
71561
|
"provider": "synthetic",
|
|
71499
71562
|
"baseUrl": "https://api.synthetic.new/openai/v1",
|
|
@@ -71551,7 +71614,7 @@
|
|
|
71551
71614
|
},
|
|
71552
71615
|
"hf:zai-org/GLM-5.2": {
|
|
71553
71616
|
"id": "hf:zai-org/GLM-5.2",
|
|
71554
|
-
"name": "
|
|
71617
|
+
"name": "GLM-5.2",
|
|
71555
71618
|
"api": "openai-completions",
|
|
71556
71619
|
"provider": "synthetic",
|
|
71557
71620
|
"baseUrl": "https://api.synthetic.new/openai/v1",
|
|
@@ -73126,6 +73189,36 @@
|
|
|
73126
73189
|
"supportsUsageInStreaming": false
|
|
73127
73190
|
}
|
|
73128
73191
|
},
|
|
73192
|
+
"claude-sonnet-5": {
|
|
73193
|
+
"id": "claude-sonnet-5",
|
|
73194
|
+
"name": "Claude Sonnet 5",
|
|
73195
|
+
"api": "openai-completions",
|
|
73196
|
+
"provider": "venice",
|
|
73197
|
+
"baseUrl": "https://api.venice.ai/api/v1",
|
|
73198
|
+
"reasoning": true,
|
|
73199
|
+
"input": [
|
|
73200
|
+
"text",
|
|
73201
|
+
"image"
|
|
73202
|
+
],
|
|
73203
|
+
"cost": {
|
|
73204
|
+
"input": 3,
|
|
73205
|
+
"output": 15,
|
|
73206
|
+
"cacheRead": 0.3,
|
|
73207
|
+
"cacheWrite": 3.75
|
|
73208
|
+
},
|
|
73209
|
+
"contextWindow": 1000000,
|
|
73210
|
+
"maxTokens": 64000,
|
|
73211
|
+
"thinking": {
|
|
73212
|
+
"mode": "effort",
|
|
73213
|
+
"efforts": [
|
|
73214
|
+
"minimal",
|
|
73215
|
+
"low",
|
|
73216
|
+
"medium",
|
|
73217
|
+
"high",
|
|
73218
|
+
"xhigh"
|
|
73219
|
+
]
|
|
73220
|
+
}
|
|
73221
|
+
},
|
|
73129
73222
|
"deepseek-v3.2": {
|
|
73130
73223
|
"id": "deepseek-v3.2",
|
|
73131
73224
|
"name": "DeepSeek V3.2",
|
|
@@ -74395,7 +74488,7 @@
|
|
|
74395
74488
|
},
|
|
74396
74489
|
"minimax-m3": {
|
|
74397
74490
|
"id": "minimax-m3",
|
|
74398
|
-
"name": "MiniMax-M3
|
|
74491
|
+
"name": "MiniMax-M3",
|
|
74399
74492
|
"api": "openai-completions",
|
|
74400
74493
|
"provider": "venice",
|
|
74401
74494
|
"baseUrl": "https://api.venice.ai/api/v1",
|
|
@@ -82295,6 +82388,14 @@
|
|
|
82295
82388
|
},
|
|
82296
82389
|
"contextWindow": 2000000,
|
|
82297
82390
|
"maxTokens": 2000000,
|
|
82391
|
+
"compat": {
|
|
82392
|
+
"reasoningEffortMap": {
|
|
82393
|
+
"minimal": "low"
|
|
82394
|
+
},
|
|
82395
|
+
"includeEncryptedReasoning": false,
|
|
82396
|
+
"filterReasoningHistory": true,
|
|
82397
|
+
"omitReasoningEffort": false
|
|
82398
|
+
},
|
|
82298
82399
|
"thinking": {
|
|
82299
82400
|
"mode": "effort",
|
|
82300
82401
|
"efforts": [
|
|
@@ -82307,14 +82408,6 @@
|
|
|
82307
82408
|
"effortMap": {
|
|
82308
82409
|
"minimal": "low"
|
|
82309
82410
|
}
|
|
82310
|
-
},
|
|
82311
|
-
"compat": {
|
|
82312
|
-
"reasoningEffortMap": {
|
|
82313
|
-
"minimal": "low"
|
|
82314
|
-
},
|
|
82315
|
-
"includeEncryptedReasoning": false,
|
|
82316
|
-
"filterReasoningHistory": true,
|
|
82317
|
-
"omitReasoningEffort": false
|
|
82318
82411
|
}
|
|
82319
82412
|
},
|
|
82320
82413
|
"grok-4.3": {
|
|
@@ -82336,6 +82429,14 @@
|
|
|
82336
82429
|
},
|
|
82337
82430
|
"contextWindow": 1000000,
|
|
82338
82431
|
"maxTokens": 1000000,
|
|
82432
|
+
"compat": {
|
|
82433
|
+
"reasoningEffortMap": {
|
|
82434
|
+
"minimal": "low"
|
|
82435
|
+
},
|
|
82436
|
+
"includeEncryptedReasoning": false,
|
|
82437
|
+
"filterReasoningHistory": true,
|
|
82438
|
+
"omitReasoningEffort": false
|
|
82439
|
+
},
|
|
82339
82440
|
"thinking": {
|
|
82340
82441
|
"mode": "effort",
|
|
82341
82442
|
"efforts": [
|
|
@@ -82348,14 +82449,6 @@
|
|
|
82348
82449
|
"effortMap": {
|
|
82349
82450
|
"minimal": "low"
|
|
82350
82451
|
}
|
|
82351
|
-
},
|
|
82352
|
-
"compat": {
|
|
82353
|
-
"reasoningEffortMap": {
|
|
82354
|
-
"minimal": "low"
|
|
82355
|
-
},
|
|
82356
|
-
"includeEncryptedReasoning": false,
|
|
82357
|
-
"filterReasoningHistory": true,
|
|
82358
|
-
"omitReasoningEffort": false
|
|
82359
82452
|
}
|
|
82360
82453
|
},
|
|
82361
82454
|
"grok-build": {
|
|
@@ -453,13 +453,15 @@ export const CATALOG_PROVIDERS = [
|
|
|
453
453
|
defaultModel: "anthropic/claude-opus-4.8",
|
|
454
454
|
envVars: ["ZENMUX_API_KEY"],
|
|
455
455
|
createModelManagerOptions: (config: ModelManagerConfig) => zenmuxModelManagerOptions(config),
|
|
456
|
-
|
|
456
|
+
allowUnauthenticated: true,
|
|
457
|
+
catalogDiscovery: { label: "ZenMux", allowUnauthenticated: true },
|
|
457
458
|
},
|
|
458
459
|
{
|
|
459
460
|
id: "zhipu-coding-plan",
|
|
460
|
-
defaultModel: "glm-5.
|
|
461
|
+
defaultModel: "glm-5.1",
|
|
461
462
|
envVars: ["ZHIPU_API_KEY"],
|
|
462
463
|
createModelManagerOptions: (config: ModelManagerConfig) => zhipuCodingPlanModelManagerOptions(config),
|
|
464
|
+
dynamicModelsAuthoritative: true,
|
|
463
465
|
catalogDiscovery: { label: "Zhipu Coding Plan" },
|
|
464
466
|
},
|
|
465
467
|
] as const satisfies readonly ProviderCatalogEntry[];
|
|
@@ -1283,6 +1283,7 @@ export function zhipuCodingPlanModelManagerOptions(
|
|
|
1283
1283
|
const baseUrl = config?.baseUrl ?? "https://open.bigmodel.cn/api/coding/paas/v4";
|
|
1284
1284
|
return {
|
|
1285
1285
|
providerId: "zhipu-coding-plan",
|
|
1286
|
+
dynamicModelsAuthoritative: true,
|
|
1286
1287
|
...(apiKey && {
|
|
1287
1288
|
fetchDynamicModels: () =>
|
|
1288
1289
|
fetchOpenAICompatibleModels({
|
|
@@ -2035,7 +2036,11 @@ function normalizeZenMuxOpenAiBaseUrl(baseUrl?: string): string {
|
|
|
2035
2036
|
if (!value) {
|
|
2036
2037
|
return ZENMUX_OPENAI_BASE_URL;
|
|
2037
2038
|
}
|
|
2038
|
-
|
|
2039
|
+
const normalized = value.endsWith("/") ? value.slice(0, -1) : value;
|
|
2040
|
+
if (normalized.endsWith("/api/anthropic")) {
|
|
2041
|
+
return normalized.replace("/api/anthropic", "/api/v1");
|
|
2042
|
+
}
|
|
2043
|
+
return normalized;
|
|
2039
2044
|
}
|
|
2040
2045
|
|
|
2041
2046
|
function toZenMuxAnthropicBaseUrl(openAiBaseUrl: string): string {
|
|
@@ -2103,37 +2108,35 @@ export function zenmuxModelManagerOptions(config?: ZenMuxModelManagerConfig): Mo
|
|
|
2103
2108
|
const anthropicBaseUrl = toZenMuxAnthropicBaseUrl(openAiBaseUrl);
|
|
2104
2109
|
return {
|
|
2105
2110
|
providerId: "zenmux",
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
}),
|
|
2136
|
-
}),
|
|
2111
|
+
fetchDynamicModels: () =>
|
|
2112
|
+
fetchOpenAICompatibleModels<Api>({
|
|
2113
|
+
api: "openai-completions",
|
|
2114
|
+
provider: "zenmux",
|
|
2115
|
+
baseUrl: openAiBaseUrl,
|
|
2116
|
+
apiKey,
|
|
2117
|
+
mapModel: (entry, defaults) => {
|
|
2118
|
+
const pricings = isRecord(entry.pricings) ? entry.pricings : undefined;
|
|
2119
|
+
const capabilities = isRecord(entry.capabilities) ? entry.capabilities : undefined;
|
|
2120
|
+
const isAnthropicModel = isZenMuxAnthropicModel(entry, defaults.id);
|
|
2121
|
+
return {
|
|
2122
|
+
...defaults,
|
|
2123
|
+
name: toModelName(entry.display_name, defaults.name),
|
|
2124
|
+
api: isAnthropicModel ? "anthropic-messages" : "openai-completions",
|
|
2125
|
+
baseUrl: isAnthropicModel ? anthropicBaseUrl : openAiBaseUrl,
|
|
2126
|
+
reasoning: capabilities?.reasoning === true || defaults.reasoning,
|
|
2127
|
+
input: toInputCapabilities(entry.input_modalities),
|
|
2128
|
+
cost: {
|
|
2129
|
+
input: getZenMuxPricingValue(pricings, "prompt"),
|
|
2130
|
+
output: getZenMuxPricingValue(pricings, "completion"),
|
|
2131
|
+
cacheRead: getZenMuxPricingValue(pricings, "input_cache_read"),
|
|
2132
|
+
cacheWrite: getZenMuxCacheWritePrice(pricings),
|
|
2133
|
+
},
|
|
2134
|
+
contextWindow: toPositiveNumber(entry.context_length, defaults.contextWindow),
|
|
2135
|
+
maxTokens: toPositiveNumber(entry.max_completion_tokens, defaults.maxTokens),
|
|
2136
|
+
};
|
|
2137
|
+
},
|
|
2138
|
+
fetch: config?.fetch,
|
|
2139
|
+
}),
|
|
2137
2140
|
};
|
|
2138
2141
|
}
|
|
2139
2142
|
|
package/src/types.ts
CHANGED
|
@@ -324,14 +324,6 @@ export interface OpenAICompat {
|
|
|
324
324
|
strictResponsesPairing?: boolean;
|
|
325
325
|
/** Whether the Responses API accepts the `detail: "original"` image hint. Default: auto-detected (false for GitHub Copilot, which rejects it with a 400). */
|
|
326
326
|
supportsImageDetailOriginal?: boolean;
|
|
327
|
-
/**
|
|
328
|
-
* Append a trailing no-reasoning developer item when the caller did not
|
|
329
|
-
* request reasoning, suppressing default reasoning on models that cannot
|
|
330
|
-
* disable it via request params (Responses APIs only; see
|
|
331
|
-
* https://community.openai.com/t/need-reasoning-false-option-for-gpt-5/1351588/7).
|
|
332
|
-
* The prompt must not look like an execution or tool budget. Default: auto-detected (GPT-5-family model names).
|
|
333
|
-
*/
|
|
334
|
-
requiresReasoningSuppressionPrompt?: boolean;
|
|
335
327
|
/** Whether streamed reasoning deltas for the same field may repeat the full cumulative text snapshot. Default: false. */
|
|
336
328
|
reasoningDeltasMayBeCumulative?: boolean;
|
|
337
329
|
/** Strip leaked DeepSeek chat-template special tokens from visible content deltas. Default: auto-detected. */
|
|
@@ -557,7 +549,6 @@ export type ResolvedOpenAICompat = ResolvedOpenAISharedCompat &
|
|
|
557
549
|
| "thinkingKeep"
|
|
558
550
|
| "strictResponsesPairing"
|
|
559
551
|
| "supportsImageDetailOriginal"
|
|
560
|
-
| "requiresReasoningSuppressionPrompt"
|
|
561
552
|
| "enableGeminiThinkingLoopGuard"
|
|
562
553
|
| "whenThinking"
|
|
563
554
|
>
|
|
@@ -581,7 +572,6 @@ export interface ResolvedOpenAIResponsesCompat extends ResolvedOpenAISharedCompa
|
|
|
581
572
|
supportsLongPromptCacheRetention: boolean;
|
|
582
573
|
strictResponsesPairing: boolean;
|
|
583
574
|
supportsImageDetailOriginal: boolean;
|
|
584
|
-
requiresReasoningSuppressionPrompt: boolean;
|
|
585
575
|
supportsObfuscationOptOut: boolean;
|
|
586
576
|
streamIdleTimeoutMs?: number;
|
|
587
577
|
}
|
|
@@ -602,6 +592,17 @@ export type ResolvedAnthropicCompat = Required<AnthropicCompat> & {
|
|
|
602
592
|
* env headers, and cache-TTL shaping without per-request URL parsing.
|
|
603
593
|
*/
|
|
604
594
|
officialEndpoint: boolean;
|
|
595
|
+
/**
|
|
596
|
+
* The configured endpoint enforces Anthropic's signature protocol on
|
|
597
|
+
* replayed thinking blocks — either the official API itself or a proxy
|
|
598
|
+
* that forwards to it (GitHub Copilot, ZenMux, Cloudflare AI Gateway's
|
|
599
|
+
* `/anthropic` route, Google Vertex's `publishers/anthropic/…`).
|
|
600
|
+
* Downstream transforms strip stale cross-model thinking signatures on
|
|
601
|
+
* these endpoints so the signing proxy doesn't 400 with
|
|
602
|
+
* `Invalid signature in thinking block` (#4297). Superset of
|
|
603
|
+
* {@link officialEndpoint}.
|
|
604
|
+
*/
|
|
605
|
+
signingEndpoint: boolean;
|
|
605
606
|
};
|
|
606
607
|
|
|
607
608
|
/**
|