Skip to content

Commit 7416328

Browse files
hannesrudolphPeterDaveHello
authored andcommitted
feat(vertex): add 1M context window beta support for Claude Sonnet 4 (RooCodeInc#10209)
1 parent db1a2cb commit 7416328

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/api/providers/anthropic-vertex.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,14 @@ export class AnthropicVertexHandler extends BaseProvider implements SingleComple
247247
betas.push("context-1m-2025-08-07")
248248
}
249249

250+
// Build betas array for request headers
251+
const betas: string[] = []
252+
253+
// Add 1M context beta flag if enabled for supported models
254+
if (enable1MContext) {
255+
betas.push("context-1m-2025-08-07")
256+
}
257+
250258
// The `:thinking` suffix indicates that the model is a "Hybrid"
251259
// reasoning model and that reasoning is required to be enabled.
252260
// The actual model ID honored by Anthropic's API does not have this

0 commit comments

Comments
 (0)