mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-22 07:02:16 +03:00
feat(sse): add GLM-5.3 models and effort tiers (#10896)
Merged — clean extraction from #10358's genuinely new content (see PR body for the rationale: an unrelated .planning/codebase/ scaffolding dump was dropped). typecheck/file-size/changelog/provider-consistency gates clean, 18/18 tests passing.
This commit is contained in:
committed by
GitHub
parent
c79faa45fb
commit
7afafcecc9
@@ -66,7 +66,14 @@ const BEDROCK_CLAUDE_ALIASES = (...modelIds: string[]) => [
|
||||
// Provider discovery/sync sources can under-report GLM-5.2 IDs as 128K.
|
||||
// Keep native/bare Z.AI GLM-5.2 context authoritative, but do not blindly apply
|
||||
// it to every provider-wrapped alias: hosted providers can and do cap lower.
|
||||
const AUTHORITATIVE_CONTEXT_WINDOW_MODEL_IDS = new Set(["glm-5.2", "glm-5.2-high", "glm-5.2-max"]);
|
||||
const AUTHORITATIVE_CONTEXT_WINDOW_MODEL_IDS = new Set([
|
||||
"glm-5.3",
|
||||
"glm-5.3-high",
|
||||
"glm-5.3-low",
|
||||
"glm-5.2",
|
||||
"glm-5.2-high",
|
||||
"glm-5.2-max",
|
||||
]);
|
||||
const AUTHORITATIVE_PROVIDER_CONTEXT_WINDOWS = new Map<string, number>([
|
||||
["cloudflare-ai/@cf/zai-org/glm-5.2", 262144],
|
||||
// Hugging Face Router has 1M-capable backends, but bare routing can select
|
||||
@@ -567,6 +574,30 @@ export const MODEL_SPECS: Record<string, ModelSpec> = {
|
||||
supportsTools: true,
|
||||
},
|
||||
|
||||
// ── Z.AI GLM-5.3 (1M context mirrored from 5.2 — same base model; 128K max
|
||||
// output; effort via reasoning_effort param, tiers are OmniRoute aliases) ──
|
||||
"glm-5.3": {
|
||||
maxOutputTokens: 131072,
|
||||
contextWindow: 1000000,
|
||||
thinkingBudgetCap: 38912,
|
||||
supportsThinking: true,
|
||||
supportsTools: true,
|
||||
},
|
||||
"glm-5.3-high": {
|
||||
maxOutputTokens: 131072,
|
||||
contextWindow: 1000000,
|
||||
thinkingBudgetCap: 38912,
|
||||
supportsThinking: true,
|
||||
supportsTools: true,
|
||||
},
|
||||
"glm-5.3-low": {
|
||||
maxOutputTokens: 131072,
|
||||
contextWindow: 1000000,
|
||||
thinkingBudgetCap: 38912,
|
||||
supportsThinking: true,
|
||||
supportsTools: true,
|
||||
},
|
||||
|
||||
// ── Z.AI GLM-5.2 (1M context, 128K max output, effort tiers) ────
|
||||
"glm-5.2": {
|
||||
maxOutputTokens: 131072,
|
||||
|
||||
@@ -111,6 +111,30 @@ export const CLAUDE_SONNET_5_PRICING = {
|
||||
};
|
||||
|
||||
export const GLM_PRICING = {
|
||||
// GLM-5.3 (2026-08-14): Z.ai hasn't published 5.3 rates yet — mirrored from
|
||||
// GLM-5.2 (same base model; 5.1 and 5.2 also share identical rates).
|
||||
// Correct when https://docs.z.ai/guides/overview/pricing lists glm-5.3.
|
||||
"glm-5.3": {
|
||||
input: 1.2,
|
||||
output: 5,
|
||||
cached: 0.3,
|
||||
reasoning: 5,
|
||||
cache_creation: 1.2,
|
||||
},
|
||||
"glm-5.3-high": {
|
||||
input: 1.2,
|
||||
output: 5,
|
||||
cached: 0.3,
|
||||
reasoning: 5,
|
||||
cache_creation: 1.2,
|
||||
},
|
||||
"glm-5.3-low": {
|
||||
input: 1.2,
|
||||
output: 5,
|
||||
cached: 0.3,
|
||||
reasoning: 5,
|
||||
cache_creation: 1.2,
|
||||
},
|
||||
"glm-5.2": {
|
||||
input: 1.2,
|
||||
output: 5,
|
||||
|
||||
Reference in New Issue
Block a user