mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-21 12:00:15 +00:00
fix(ai): correct opencode context windows for Claude Sonnet 4/4.5
fixes #1383
This commit is contained in:
parent
e10a831e56
commit
2c3f624348
2 changed files with 10 additions and 6 deletions
|
|
@ -642,7 +642,7 @@ async function generateModels() {
|
||||||
opus45.cost.cacheWrite = 6.25;
|
opus45.cost.cacheWrite = 6.25;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Temporary Opus 4.6 overrides until upstream model metadata is corrected.
|
// Temporary overrides until upstream model metadata is corrected.
|
||||||
for (const candidate of allModels) {
|
for (const candidate of allModels) {
|
||||||
if (candidate.provider === "amazon-bedrock" && candidate.id.includes("anthropic.claude-opus-4-6-v1")) {
|
if (candidate.provider === "amazon-bedrock" && candidate.id.includes("anthropic.claude-opus-4-6-v1")) {
|
||||||
candidate.cost.cacheRead = 0.5;
|
candidate.cost.cacheRead = 0.5;
|
||||||
|
|
@ -652,6 +652,10 @@ async function generateModels() {
|
||||||
if ((candidate.provider === "anthropic" || candidate.provider === "opencode") && candidate.id === "claude-opus-4-6") {
|
if ((candidate.provider === "anthropic" || candidate.provider === "opencode") && candidate.id === "claude-opus-4-6") {
|
||||||
candidate.contextWindow = 200000;
|
candidate.contextWindow = 200000;
|
||||||
}
|
}
|
||||||
|
// opencode lists Claude Sonnet 4/4.5 with 1M context, actual limit is 200K
|
||||||
|
if (candidate.provider === "opencode" && (candidate.id === "claude-sonnet-4-5" || candidate.id === "claude-sonnet-4")) {
|
||||||
|
candidate.contextWindow = 200000;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add missing EU Opus 4.6 profile
|
// Add missing EU Opus 4.6 profile
|
||||||
|
|
|
||||||
|
|
@ -5231,7 +5231,7 @@ export const MODELS = {
|
||||||
cacheRead: 0.3,
|
cacheRead: 0.3,
|
||||||
cacheWrite: 3.75,
|
cacheWrite: 3.75,
|
||||||
},
|
},
|
||||||
contextWindow: 1000000,
|
contextWindow: 200000,
|
||||||
maxTokens: 64000,
|
maxTokens: 64000,
|
||||||
} satisfies Model<"anthropic-messages">,
|
} satisfies Model<"anthropic-messages">,
|
||||||
"claude-sonnet-4-5": {
|
"claude-sonnet-4-5": {
|
||||||
|
|
@ -5248,7 +5248,7 @@ export const MODELS = {
|
||||||
cacheRead: 0.3,
|
cacheRead: 0.3,
|
||||||
cacheWrite: 3.75,
|
cacheWrite: 3.75,
|
||||||
},
|
},
|
||||||
contextWindow: 1000000,
|
contextWindow: 200000,
|
||||||
maxTokens: 64000,
|
maxTokens: 64000,
|
||||||
} satisfies Model<"anthropic-messages">,
|
} satisfies Model<"anthropic-messages">,
|
||||||
"gemini-3-flash": {
|
"gemini-3-flash": {
|
||||||
|
|
@ -7336,9 +7336,9 @@ export const MODELS = {
|
||||||
reasoning: true,
|
reasoning: true,
|
||||||
input: ["text", "image"],
|
input: ["text", "image"],
|
||||||
cost: {
|
cost: {
|
||||||
input: 0.44999999999999996,
|
input: 0.3,
|
||||||
output: 2.25,
|
output: 1.5,
|
||||||
cacheRead: 0.075,
|
cacheRead: 0.049999999999999996,
|
||||||
cacheWrite: 0,
|
cacheWrite: 0,
|
||||||
},
|
},
|
||||||
contextWindow: 262144,
|
contextWindow: 262144,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue