Raise context length to 1M (#2135)

This commit is contained in:
Armin Ronacher
2026-03-14 01:34:25 +01:00
committed by GitHub
parent 933348593c
commit d574c03e19

View File

@@ -665,13 +665,16 @@ async function generateModels() {
if (candidate.provider === "amazon-bedrock" && candidate.id.includes("anthropic.claude-opus-4-6-v1")) {
candidate.cost.cacheRead = 0.5;
candidate.cost.cacheWrite = 6.25;
candidate.contextWindow = 200000;
candidate.contextWindow = 1000000;
}
if (candidate.provider === "amazon-bedrock" && candidate.id.includes("anthropic.claude-sonnet-4-6")) {
candidate.contextWindow = 1000000;
}
if (
(candidate.provider === "anthropic" || candidate.provider === "opencode" || candidate.provider === "opencode-go") &&
candidate.id === "claude-opus-4-6"
(candidate.id === "claude-opus-4-6" || candidate.id === "claude-sonnet-4-6")
) {
candidate.contextWindow = 200000;
candidate.contextWindow = 1000000;
}
// OpenCode variants list Claude Sonnet 4/4.5 with 1M context, actual limit is 200K
if (
@@ -719,7 +722,7 @@ async function generateModels() {
cacheRead: 0.5,
cacheWrite: 6.25,
},
contextWindow: 200000,
contextWindow: 1000000,
maxTokens: 128000,
});
}
@@ -740,7 +743,7 @@ async function generateModels() {
cacheRead: 0.5,
cacheWrite: 6.25,
},
contextWindow: 200000,
contextWindow: 1000000,
maxTokens: 128000,
});
}
@@ -761,7 +764,7 @@ async function generateModels() {
cacheRead: 0.3,
cacheWrite: 3.75,
},
contextWindow: 200000,
contextWindow: 1000000,
maxTokens: 64000,
});
}