fix(ai): correct opencode context windows for Claude Sonnet 4/4.5
fixes #1383
This commit is contained in:
@@ -642,7 +642,7 @@ async function generateModels() {
|
||||
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) {
|
||||
if (candidate.provider === "amazon-bedrock" && candidate.id.includes("anthropic.claude-opus-4-6-v1")) {
|
||||
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") {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user