mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 00:04:50 +00:00
fix(ai): cap gpt-5.4 context windows to 272k
This commit is contained in:
parent
f8d731a134
commit
16ec7de29c
2 changed files with 23 additions and 25 deletions
|
|
@ -647,7 +647,10 @@ async function generateModels() {
|
|||
const aiGatewayModels = await fetchAiGatewayModels();
|
||||
|
||||
// Combine models (models.dev has priority)
|
||||
const allModels = [...modelsDevModels, ...openRouterModels, ...aiGatewayModels];
|
||||
const allModels = [...modelsDevModels, ...openRouterModels, ...aiGatewayModels].filter(
|
||||
(model) =>
|
||||
!((model.provider === "opencode" || model.provider === "opencode-go") && model.id === "gpt-5.3-codex-spark"),
|
||||
);
|
||||
|
||||
// Fix incorrect cache pricing for Claude Opus 4.5 from models.dev
|
||||
// models.dev has 3x the correct pricing (1.5/18.75 instead of 0.5/6.25)
|
||||
|
|
@ -685,6 +688,18 @@ async function generateModels() {
|
|||
candidate.contextWindow = 272000;
|
||||
candidate.maxTokens = 128000;
|
||||
}
|
||||
// Keep selected OpenRouter model metadata stable until upstream settles.
|
||||
if (candidate.provider === "openrouter" && candidate.id === "moonshotai/kimi-k2.5") {
|
||||
candidate.cost.input = 0.41;
|
||||
candidate.cost.output = 2.06;
|
||||
candidate.cost.cacheRead = 0.07;
|
||||
candidate.maxTokens = 4096;
|
||||
}
|
||||
if (candidate.provider === "openrouter" && candidate.id === "z-ai/glm-5") {
|
||||
candidate.cost.input = 0.6;
|
||||
candidate.cost.output = 1.9;
|
||||
candidate.cost.cacheRead = 0.119;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue