Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/types/src/providers/bedrock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ export const bedrockModels = {
// 128K max output tokens per the AWS Bedrock model card:
// https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-anthropic-claude-opus-5-5.html
maxTokens: 128_000,
supportsMaxTokens: true,
contextWindow: 1_000_000, // 1M context window native (no beta header required)
supportsImages: true,
supportsPromptCache: true,
Expand Down
7 changes: 4 additions & 3 deletions src/api/providers/__tests__/bedrock.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,17 @@ describe("AwsBedrockHandler", () => {
["anthropic.claude-opus-4-7", 128_000],
["anthropic.claude-opus-4-8", 128_000],
["anthropic.claude-opus-5", 128_000],
["anthropic.claude-opus-5-5", 128_000],
] as const)("exposes %s output ceiling without raising request defaults", async (apiModelId, ceiling) => {
for (const enableReasoningEffort of [true, false]) {
for (const modelMaxTokens of [undefined, ceiling]) {
const provider = new AwsBedrockHandler({ apiModelId, enableReasoningEffort, modelMaxTokens })
expect(provider.getModel().info.maxTokens).toBe(ceiling)
const modelInfo = provider.getModel().info
expect(modelInfo.maxTokens).toBe(ceiling)
provider["client"].send = vi.fn().mockResolvedValue({ stream: asyncStreamFrom([]) })
await collectStream(provider.createMessage("system", [{ role: "user", content: "hello" }]))
const configurableWithoutReasoning = apiModelId.endsWith("-5")
const expected =
modelMaxTokens && (enableReasoningEffort || configurableWithoutReasoning)
modelMaxTokens && (enableReasoningEffort || modelInfo.supportsMaxTokens)
? ceiling
: enableReasoningEffort
? 16_384
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ describe("ThinkingBudget", () => {
["anthropic.claude-opus-4-8", 128_000],
["anthropic.claude-sonnet-5", 128_000],
["anthropic.claude-opus-5", 128_000],
["anthropic.claude-opus-5-5", 128_000],
] as const)("allows selecting the documented Bedrock output ceiling for %s", (apiModelId, ceiling) => {
render(
<ThinkingBudget
Expand Down
Loading