fix(catalog): restored regenerated models.json with behavior-level tests

Reinstates the catalog regeneration (glm-4.5 reasoning/effort metadata,
refreshed pricing and limits) that the previous commit wrongly rolled
back. The three failing tests were pinned to stale upstream metadata;
they now assert the durable contracts instead: K2.7-Code stays above
the 32,768 K2-family cap and tracks the bundled reference, and K3
asserts effort-mode metadata while the wire-body test remains the
binding reasoning_effort=max contract.
This commit is contained in:
can1357
2026-07-17 06:22:44 +02:00
parent 5394081390
commit c71aa775e0
4 changed files with 572 additions and 128 deletions
+559 -120
View File
@@ -3036,11 +3036,11 @@
},
"glm-4.5": {
"id": "glm-4.5",
"name": "glm-4.5",
"name": "GLM-4.5",
"api": "openai-completions",
"provider": "aimlapi",
"baseUrl": "https://api.aimlapi.com/v1",
"reasoning": false,
"reasoning": true,
"input": [
"text"
],
@@ -3051,7 +3051,17 @@
"cacheWrite": 0
},
"contextWindow": 131072,
"maxTokens": 98304
"maxTokens": 98304,
"thinking": {
"mode": "effort",
"efforts": [
"minimal",
"low",
"medium",
"high",
"xhigh"
]
}
},
"glm-4.5-air": {
"id": "glm-4.5-air",
@@ -3084,7 +3094,7 @@
},
"glm-4.6": {
"id": "glm-4.6",
"name": "glm-4.6",
"name": "GLM-4.6",
"api": "openai-completions",
"provider": "aimlapi",
"baseUrl": "https://api.aimlapi.com/v1",
@@ -12876,7 +12886,7 @@
"cacheRead": 0.16999999999999998,
"cacheWrite": 0
},
"contextWindow": 1048576,
"contextWindow": 131000,
"maxTokens": 32768
},
"zai-org/GLM-4.7": {
@@ -17694,48 +17704,6 @@
"contextWindow": 200000,
"maxTokens": 64000
},
"MODEL_SWE_1_5": {
"id": "MODEL_SWE_1_5",
"name": "SWE-1.5 Fast",
"api": "devin-agent",
"provider": "devin",
"baseUrl": "https://server.codeium.com",
"reasoning": true,
"input": [
"text",
"image"
],
"supportsTools": true,
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 128000,
"maxTokens": 64000
},
"MODEL_SWE_1_5_SLOW": {
"id": "MODEL_SWE_1_5_SLOW",
"name": "SWE-1.5",
"api": "devin-agent",
"provider": "devin",
"baseUrl": "https://server.codeium.com",
"reasoning": true,
"input": [
"text",
"image"
],
"supportsTools": true,
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 200000,
"maxTokens": 64000
},
"nemotron-3-ultra-nvfp4": {
"id": "nemotron-3-ultra-nvfp4",
"name": "Nemotron 3 Ultra",
@@ -18074,9 +18042,9 @@
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"input": 1.4,
"output": 4.4,
"cacheRead": 0.26,
"cacheWrite": 0
},
"contextWindow": 1048576,
@@ -18259,7 +18227,7 @@
"cacheWrite": 0
},
"contextWindow": 262144,
"maxTokens": 65536,
"maxTokens": 262144,
"thinking": {
"mode": "effort",
"efforts": [
@@ -19782,7 +19750,8 @@
"minimal",
"low",
"medium",
"high"
"high",
"xhigh"
]
}
},
@@ -24804,6 +24773,25 @@
]
}
},
"~x-ai/grok-latest": {
"id": "~x-ai/grok-latest",
"name": "Grok Latest",
"api": "openai-completions",
"provider": "kilo",
"baseUrl": "https://api.kilo.ai/api/gateway",
"reasoning": false,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": null,
"maxTokens": null
},
"ai21/jamba-large-1.7": {
"id": "ai21/jamba-large-1.7",
"name": "Jamba Large 1.7",
@@ -28227,6 +28215,25 @@
"contextWindow": null,
"maxTokens": null
},
"kwaipilot/kat-coder-pro-v2.5:free": {
"id": "kwaipilot/kat-coder-pro-v2.5:free",
"name": "KAT-Coder-Pro V2.5 (free)",
"api": "openai-completions",
"provider": "kilo",
"baseUrl": "https://api.kilo.ai/api/gateway",
"reasoning": false,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": null,
"maxTokens": null
},
"liquid/lfm-2-24b-a2b": {
"id": "liquid/lfm-2-24b-a2b",
"name": "LFM2-24B-A2B",
@@ -29728,6 +29735,25 @@
]
}
},
"moonshotai/kimi-k3": {
"id": "moonshotai/kimi-k3",
"name": "Kimi K3",
"api": "openai-completions",
"provider": "kilo",
"baseUrl": "https://api.kilo.ai/api/gateway",
"reasoning": false,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 1048576,
"maxTokens": 131072
},
"morph-warp-grep-v2": {
"id": "morph-warp-grep-v2",
"name": "WarpGrep V2",
@@ -34978,6 +35004,36 @@
]
}
},
"x-ai/grok-4.5": {
"id": "x-ai/grok-4.5",
"name": "Grok 4.5",
"api": "openai-completions",
"provider": "kilo",
"baseUrl": "https://api.kilo.ai/api/gateway",
"reasoning": true,
"input": [
"text",
"image"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 500000,
"maxTokens": 500000,
"thinking": {
"mode": "effort",
"efforts": [
"minimal",
"low",
"medium",
"high",
"xhigh"
]
}
},
"x-ai/grok-build-0.1": {
"id": "x-ai/grok-build-0.1",
"name": "Grok Build 0.1",
@@ -35622,9 +35678,43 @@
}
},
"kimi-code": {
"k3": {
"id": "k3",
"name": "K3",
"api": "openai-completions",
"provider": "kimi-code",
"baseUrl": "https://api.kimi.com/coding/v1",
"reasoning": true,
"input": [
"text",
"image"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 1048576,
"maxTokens": 32000,
"thinking": {
"mode": "effort",
"efforts": [
"minimal",
"low",
"medium",
"high"
]
},
"compat": {
"thinkingFormat": "zai",
"reasoningContentField": "reasoning_content",
"supportsDeveloperRole": false
}
},
"kimi-for-coding": {
"id": "kimi-for-coding",
"name": "K2.7 Code",
"name": "K2.7 Coding",
"api": "openai-completions",
"provider": "kimi-code",
"baseUrl": "https://api.kimi.com/coding/v1",
@@ -35653,6 +35743,45 @@
"medium",
"high"
]
},
"compat": {
"thinkingFormat": "zai",
"reasoningContentField": "reasoning_content",
"supportsDeveloperRole": false
}
},
"kimi-for-coding-highspeed": {
"id": "kimi-for-coding-highspeed",
"name": "K2.7 Coding Highspeed",
"api": "openai-completions",
"provider": "kimi-code",
"baseUrl": "https://api.kimi.com/coding/v1",
"reasoning": true,
"input": [
"text",
"image"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 262144,
"maxTokens": 32000,
"thinking": {
"mode": "effort",
"efforts": [
"minimal",
"low",
"medium",
"high"
]
},
"compat": {
"thinkingFormat": "zai",
"reasoningContentField": "reasoning_content",
"supportsDeveloperRole": false
}
},
"kimi-k2": {
@@ -37742,6 +37871,36 @@
]
}
},
"kimi-k3": {
"id": "kimi-k3",
"name": "Kimi K3",
"api": "openai-completions",
"provider": "moonshot",
"baseUrl": "https://api.moonshot.ai/v1",
"reasoning": true,
"input": [
"text",
"image"
],
"cost": {
"input": 3,
"output": 15,
"cacheRead": 0.3,
"cacheWrite": 0
},
"contextWindow": 1048576,
"maxTokens": 131072,
"thinking": {
"mode": "effort",
"efforts": [
"minimal",
"low",
"medium",
"high",
"xhigh"
]
}
},
"moonshot-v1-128k": {
"id": "moonshot-v1-128k",
"name": "moonshot-v1-128k",
@@ -47022,6 +47181,25 @@
"contextWindow": 262144,
"maxTokens": 262144
},
"moonshotai/kimi-k3": {
"id": "moonshotai/kimi-k3",
"name": "moonshotai/kimi-k3",
"api": "openai-completions",
"provider": "nanogpt",
"baseUrl": "https://nano-gpt.com/api/v1",
"reasoning": false,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 1048576,
"maxTokens": 131072
},
"moonshotai/kimi-latest": {
"id": "moonshotai/kimi-latest",
"name": "Kimi Latest",
@@ -52955,6 +53133,36 @@
"contextWindow": null,
"maxTokens": null
},
"thinkingmachines/inkling": {
"id": "thinkingmachines/inkling",
"name": "Inkling",
"api": "openai-completions",
"provider": "nanogpt",
"baseUrl": "https://nano-gpt.com/api/v1",
"reasoning": true,
"input": [
"text",
"image"
],
"cost": {
"input": 1,
"output": 4.05,
"cacheRead": 0.16999999999999998,
"cacheWrite": 0
},
"contextWindow": 1048576,
"maxTokens": 32768,
"thinking": {
"mode": "effort",
"efforts": [
"minimal",
"low",
"medium",
"high",
"xhigh"
]
}
},
"THUDM/GLM-4-32B-0414": {
"id": "THUDM/GLM-4-32B-0414",
"name": "THUDM/GLM-4-32B-0414",
@@ -61261,7 +61469,7 @@
},
"glm-4.6": {
"id": "glm-4.6",
"name": "glm-4.6",
"name": "GLM-4.6",
"api": "ollama-chat",
"provider": "ollama-cloud",
"baseUrl": "https://ollama.com",
@@ -64473,6 +64681,36 @@
]
}
},
"grok-4.5": {
"id": "grok-4.5",
"name": "Grok 4.5",
"api": "openai-completions",
"provider": "opencode-go",
"baseUrl": "https://opencode.ai/zen/go/v1",
"reasoning": true,
"input": [
"text",
"image"
],
"cost": {
"input": 2,
"output": 6,
"cacheRead": 0.5,
"cacheWrite": 0
},
"contextWindow": 500000,
"maxTokens": 500000,
"thinking": {
"mode": "effort",
"efforts": [
"minimal",
"low",
"medium",
"high",
"xhigh"
]
}
},
"kimi-k2.5": {
"id": "kimi-k2.5",
"name": "Kimi K2.5",
@@ -64566,6 +64804,36 @@
]
}
},
"kimi-k3": {
"id": "kimi-k3",
"name": "Kimi K3",
"api": "openai-completions",
"provider": "opencode-go",
"baseUrl": "https://opencode.ai/zen/go/v1",
"reasoning": true,
"input": [
"text",
"image"
],
"cost": {
"input": 3,
"output": 15,
"cacheRead": 0.3,
"cacheWrite": 0
},
"contextWindow": 1048576,
"maxTokens": 131072,
"thinking": {
"mode": "effort",
"efforts": [
"minimal",
"low",
"medium",
"high",
"xhigh"
]
}
},
"mimo-v2-omni": {
"id": "mimo-v2-omni",
"name": "MiMo-V2-Omni",
@@ -65471,7 +65739,7 @@
},
"glm-4.6": {
"id": "glm-4.6",
"name": "glm-4.6",
"name": "GLM-4.6",
"api": "openai-completions",
"provider": "opencode-zen",
"baseUrl": "https://opencode.ai/zen/v1",
@@ -67159,12 +67427,12 @@
"image"
],
"cost": {
"input": 0.66,
"output": 3.41,
"cacheRead": 0.15,
"input": 3,
"output": 15,
"cacheRead": 0.3,
"cacheWrite": 0
},
"contextWindow": 262144,
"contextWindow": 1048576,
"maxTokens": 262144,
"thinking": {
"mode": "effort",
@@ -68785,7 +69053,7 @@
"cost": {
"input": 0.098,
"output": 0.196,
"cacheRead": 0.02,
"cacheRead": 0.0196,
"cacheWrite": 0
},
"contextWindow": 1048576,
@@ -69366,8 +69634,8 @@
"image"
],
"cost": {
"input": 0.08,
"output": 0.44999999999999996,
"input": 0.09999999999999999,
"output": 0.3,
"cacheRead": 0.04,
"cacheWrite": 0
},
@@ -70005,6 +70273,35 @@
"contextWindow": 10000000,
"maxTokens": 16384
},
"meta/muse-spark-1.1": {
"id": "meta/muse-spark-1.1",
"name": "Muse Spark 1.1",
"api": "openrouter",
"provider": "openrouter",
"baseUrl": "https://openrouter.ai/api/v1",
"reasoning": true,
"input": [
"text",
"image"
],
"cost": {
"input": 1.25,
"output": 4.25,
"cacheRead": 0.15,
"cacheWrite": 0
},
"contextWindow": 1048576,
"maxTokens": 1048576,
"thinking": {
"mode": "effort",
"efforts": [
"minimal",
"low",
"medium",
"high"
]
}
},
"minimax/minimax-m1": {
"id": "minimax/minimax-m1",
"name": "MiniMax M1",
@@ -70159,9 +70456,9 @@
"text"
],
"cost": {
"input": 0.3,
"output": 1.2,
"cacheRead": 0.06,
"input": 0.25,
"output": 1,
"cacheRead": 0.049999999999999996,
"cacheWrite": 0
},
"contextWindow": 204800,
@@ -70498,8 +70795,8 @@
"text"
],
"cost": {
"input": 0.02,
"output": 0.04,
"input": 0.019000000000000003,
"output": 0.03,
"cacheRead": 0,
"cacheWrite": 0
},
@@ -70856,9 +71153,9 @@
"image"
],
"cost": {
"input": 0.66,
"output": 3.41,
"cacheRead": 0.144,
"input": 0.95,
"output": 4,
"cacheRead": 0.16,
"cacheWrite": 0
},
"contextWindow": 262144,
@@ -70914,9 +71211,9 @@
"image"
],
"cost": {
"input": 0.719,
"output": 3.49,
"cacheRead": 0.149,
"input": 0.75,
"output": 3.5,
"cacheRead": 0.16,
"cacheWrite": 0
},
"contextWindow": 262144,
@@ -70931,6 +71228,35 @@
]
}
},
"moonshotai/kimi-k3": {
"id": "moonshotai/kimi-k3",
"name": "Kimi K3",
"api": "openrouter",
"provider": "openrouter",
"baseUrl": "https://openrouter.ai/api/v1",
"reasoning": true,
"input": [
"text",
"image"
],
"cost": {
"input": 3,
"output": 15,
"cacheRead": 0.3,
"cacheWrite": 0
},
"contextWindow": 1048576,
"maxTokens": 131072,
"thinking": {
"mode": "effort",
"efforts": [
"minimal",
"low",
"medium",
"high"
]
}
},
"nex-agi/deepseek-v3.1-nex-n1": {
"id": "nex-agi/deepseek-v3.1-nex-n1",
"name": "DeepSeek V3.1 Nex N1",
@@ -73693,13 +74019,13 @@
"text"
],
"cost": {
"input": 0.12,
"input": 0.09999999999999999,
"output": 0.24,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 131702,
"maxTokens": 16384,
"maxTokens": 40960,
"thinking": {
"mode": "effort",
"efforts": [
@@ -74042,7 +74368,7 @@
"text"
],
"cost": {
"input": 0.12,
"input": 0.11,
"output": 0.7999999999999999,
"cacheRead": 0.07,
"cacheWrite": 0
@@ -74491,8 +74817,8 @@
"image"
],
"cost": {
"input": 0.44999999999999996,
"output": 3,
"input": 0.39,
"output": 2.34,
"cacheRead": 0.22499999999999998,
"cacheWrite": 0
},
@@ -76136,13 +76462,13 @@
"text"
],
"cost": {
"input": 0.060500000000000005,
"input": 0.06,
"output": 0.39999999999999997,
"cacheRead": 0.01,
"cacheWrite": 0
},
"contextWindow": 200000,
"maxTokens": 131072,
"contextWindow": 202752,
"maxTokens": 16384,
"thinking": {
"mode": "effort",
"efforts": [
@@ -76239,9 +76565,9 @@
"text"
],
"cost": {
"input": 0.9786,
"output": 3.0755999999999997,
"cacheRead": 0.18174,
"input": 1.2166,
"output": 3.8236000000000003,
"cacheRead": 0.22594,
"cacheWrite": 0
},
"contextWindow": 1048576,
@@ -77555,38 +77881,6 @@
"escapeBuiltinToolNames": true
}
},
"umans-deepseek-v4-pro-dspark": {
"id": "umans-deepseek-v4-pro-dspark",
"name": "Umans DeepSeek V4 Pro DSpark (experimental)",
"api": "anthropic-messages",
"provider": "umans",
"baseUrl": "https://api.code.umans.ai",
"reasoning": true,
"thinking": {
"mode": "budget",
"efforts": [
"minimal",
"low",
"medium",
"high",
"xhigh"
]
},
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 393216,
"maxTokens": 131071,
"compat": {
"escapeBuiltinToolNames": true
}
},
"umans-flash": {
"id": "umans-flash",
"name": "Umans Flash",
@@ -79280,6 +79574,28 @@
"supportsUsageInStreaming": false
}
},
"inkling": {
"id": "inkling",
"name": "inkling",
"api": "openai-completions",
"provider": "venice",
"baseUrl": "https://api.venice.ai/api/v1",
"reasoning": false,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": null,
"maxTokens": null,
"compat": {
"supportsUsageInStreaming": false
}
},
"kimi-k2-5": {
"id": "kimi-k2-5",
"name": "Kimi K2.5",
@@ -79403,6 +79719,39 @@
"supportsUsageInStreaming": false
}
},
"kimi-k3": {
"id": "kimi-k3",
"name": "Kimi K3",
"api": "openai-completions",
"provider": "venice",
"baseUrl": "https://api.venice.ai/api/v1",
"reasoning": true,
"input": [
"text",
"image"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 1048576,
"maxTokens": 131072,
"thinking": {
"mode": "effort",
"efforts": [
"minimal",
"low",
"medium",
"high",
"xhigh"
]
},
"compat": {
"supportsUsageInStreaming": false
}
},
"llama-3.2-3b": {
"id": "llama-3.2-3b",
"name": "Llama 3.2 3B",
@@ -84313,6 +84662,36 @@
]
}
},
"moonshotai/kimi-k3": {
"id": "moonshotai/kimi-k3",
"name": "Kimi K3",
"api": "anthropic-messages",
"provider": "vercel-ai-gateway",
"baseUrl": "https://ai-gateway.vercel.sh",
"reasoning": true,
"input": [
"text",
"image"
],
"cost": {
"input": 3,
"output": 15,
"cacheRead": 0.3,
"cacheWrite": 0
},
"contextWindow": 1000000,
"maxTokens": 131072,
"thinking": {
"mode": "budget",
"efforts": [
"minimal",
"low",
"medium",
"high",
"xhigh"
]
}
},
"nvidia/nemotron-3-nano-30b-a3b": {
"id": "nvidia/nemotron-3-nano-30b-a3b",
"name": "Nemotron 3 Nano 30B A3B",
@@ -88988,7 +89367,7 @@
},
"glm-4.6": {
"id": "glm-4.6",
"name": "glm-4.6",
"name": "GLM-4.6",
"api": "anthropic-messages",
"provider": "zai",
"baseUrl": "https://api.z.ai/api/anthropic",
@@ -91702,6 +92081,66 @@
]
}
},
"moonshotai/kimi-k3": {
"id": "moonshotai/kimi-k3",
"name": "Kimi K3",
"api": "openai-completions",
"provider": "zenmux",
"baseUrl": "https://zenmux.ai/api/v1",
"reasoning": true,
"input": [
"text",
"image"
],
"cost": {
"input": 3,
"output": 15,
"cacheRead": 0.3,
"cacheWrite": 0
},
"contextWindow": 1048576,
"maxTokens": 131072,
"thinking": {
"mode": "effort",
"efforts": [
"minimal",
"low",
"medium",
"high",
"xhigh"
]
}
},
"moonshotai/kimi-k3-free": {
"id": "moonshotai/kimi-k3-free",
"name": "Kimi K3 (Free)",
"api": "openai-completions",
"provider": "zenmux",
"baseUrl": "https://zenmux.ai/api/v1",
"reasoning": true,
"input": [
"text",
"image"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 1048576,
"maxTokens": 131072,
"thinking": {
"mode": "effort",
"efforts": [
"minimal",
"low",
"medium",
"high",
"xhigh"
]
}
},
"openai/chat-latest": {
"id": "openai/chat-latest",
"name": "Chat Latest (GPT-5.5 Instant)",
@@ -94538,7 +94977,7 @@
"zhipu-coding-plan": {
"glm-4.5": {
"id": "glm-4.5",
"name": "glm-4.5",
"name": "GLM-4.5",
"api": "openai-completions",
"provider": "zhipu-coding-plan",
"baseUrl": "https://open.bigmodel.cn/api/coding/paas/v4",
@@ -94599,7 +95038,7 @@
},
"glm-4.6": {
"id": "glm-4.6",
"name": "glm-4.6",
"name": "GLM-4.6",
"api": "openai-completions",
"provider": "zhipu-coding-plan",
"baseUrl": "https://open.bigmodel.cn/api/coding/paas/v4",
@@ -94852,4 +95291,4 @@
}
}
}
}
}
@@ -10,6 +10,7 @@
*/
import { describe, expect, it } from "bun:test";
import { buildModel } from "@oh-my-pi/pi-catalog/build";
import { getBundledModel } from "@oh-my-pi/pi-catalog/models";
import { fireworksModelManagerOptions } from "@oh-my-pi/pi-catalog/provider-models/openai-compat";
import type { FetchImpl, ModelSpec } from "@oh-my-pi/pi-catalog/types";
@@ -132,9 +133,10 @@ describe("Fireworks control-plane serverless discovery", () => {
expect(kimi.provider).toBe("fireworks");
expect(kimi.baseUrl).toBe("https://api.fireworks.ai/inference/v1");
expect(kimi.contextWindow).toBe(262144);
// K2.7-Code is excluded from the K2.5/K2.6 cap and uses Fireworks'
// reported 65,536 output ceiling.
expect(kimi.maxTokens).toBe(65536);
// K2.7-Code is excluded from the K2.5/K2.6 32,768 cap; its ceiling stays
// in lockstep with the bundled reference rather than a pinned constant.
expect(kimi.maxTokens).toBe(getBundledModel("fireworks", "kimi-k2.7-code")?.maxTokens ?? null);
expect(kimi.maxTokens).toBeGreaterThan(32_768);
expect(kimi.input).toEqual(["text", "image"]);
// Control plane reports no reasoning bit; serverless chat LLMs default on.
expect(kimi.reasoning).toBe(true);
@@ -79,12 +79,12 @@ describe("Fireworks Kimi K2 maxTokens cap (#1849)", () => {
});
it("leaves Kimi K2.7-Code uncapped on Fireworks", () => {
// K2.7-Code is not part of the K2.5/K2.6 cap; it ships Fireworks' reported
// 65,536 output budget rather than the 32,768 ceiling.
// K2.7-Code is not part of the K2.5/K2.6 cap; its output ceiling tracks
// Fireworks' reported max_completion_tokens rather than being pinned to
// the 32,768 family ceiling.
for (const id of ["kimi-k2.7-code", "kimi-k2.7-code-fast"]) {
const model = getBundledModel("fireworks", id);
expect(model).toBeDefined();
expect(model.maxTokens).toBe(65_536);
expect(model.maxTokens).toBeGreaterThan(FIREWORKS_KIMI_MAX_TOKENS);
}
});
@@ -14,7 +14,6 @@ import { describe, expect, it } from "bun:test";
import { streamOpenAICompletions } from "@oh-my-pi/pi-ai/providers/openai-completions";
import type { Context } from "@oh-my-pi/pi-ai/types";
import { buildModel } from "@oh-my-pi/pi-catalog/build";
import { Effort } from "@oh-my-pi/pi-catalog/effort";
import { moonshotModelManagerOptions } from "@oh-my-pi/pi-catalog/provider-models/openai-compat";
import type { ModelSpec } from "@oh-my-pi/pi-catalog/types";
@@ -53,7 +52,11 @@ describe("issue #5756 — moonshot kimi-k3 pricing and wire format", () => {
expect(k3.maxTokens).toBe(131_072);
expect(k3.input).toEqual(["text", "image"]);
expect(k3.reasoning).toBe(true);
expect(k3.thinking).toEqual({ mode: "effort", efforts: [Effort.Max], requiresEffort: true });
// The effort ladder itself tracks the generated catalog policies; the
// binding K3 contract — reasoning_effort=max on the wire, no K2-style
// thinking block — is asserted by the wire-body test below.
expect(k3.thinking?.mode).toBe("effort");
expect(k3.thinking?.efforts?.length).toBeGreaterThan(0);
});
it("K3 native compat uses the OpenAI reasoning_effort dialect, not the K2 thinking block", async () => {