Skip to content

Commit c041824

Browse files
committed
1 parent 8bec7c1 commit c041824

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

‎packages/types/src/providers/bedrock.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ export const bedrockModels = {
258258
// 128K max output tokens per the AWS Bedrock model card:
259259
// https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-anthropic-claude-opus-5-5.html
260260
maxTokens: 128_000,
261+
supportsMaxTokens: true,
261262
contextWindow: 1_000_000, // 1M context window native (no beta header required)
262263
supportsImages: true,
263264
supportsPromptCache: true,

‎src/api/providers/__tests__/bedrock.spec.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,16 +141,17 @@ describe("AwsBedrockHandler", () => {
141141
["anthropic.claude-opus-4-7", 128_000],
142142
["anthropic.claude-opus-4-8", 128_000],
143143
["anthropic.claude-opus-5", 128_000],
144+
["anthropic.claude-opus-5-5", 128_000],
144145
] as const)("exposes %s output ceiling without raising request defaults", async (apiModelId, ceiling) => {
145146
for (const enableReasoningEffort of [true, false]) {
146147
for (const modelMaxTokens of [undefined, ceiling]) {
147148
const provider = new AwsBedrockHandler({ apiModelId, enableReasoningEffort, modelMaxTokens })
148-
expect(provider.getModel().info.maxTokens).toBe(ceiling)
149+
const modelInfo = provider.getModel().info
150+
expect(modelInfo.maxTokens).toBe(ceiling)
149151
provider["client"].send = vi.fn().mockResolvedValue({ stream: asyncStreamFrom([]) })
150152
await collectStream(provider.createMessage("system", [{ role: "user", content: "hello" }]))
151-
const configurableWithoutReasoning = apiModelId.endsWith("-5")
152153
const expected =
153-
modelMaxTokens && (enableReasoningEffort || configurableWithoutReasoning)
154+
modelMaxTokens && (enableReasoningEffort || modelInfo.supportsMaxTokens)
154155
? ceiling
155156
: enableReasoningEffort
156157
? 16_384

‎webview-ui/src/components/settings/__tests__/ThinkingBudget.spec.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ describe("ThinkingBudget", () => {
8484
["anthropic.claude-opus-4-8", 128_000],
8585
["anthropic.claude-sonnet-5", 128_000],
8686
["anthropic.claude-opus-5", 128_000],
87+
["anthropic.claude-opus-5-5", 128_000],
8788
] as const)("allows selecting the documented Bedrock output ceiling for %s", (apiModelId, ceiling) => {
8889
render(
8990
<ThinkingBudget

0 commit comments

Comments
 (0)