feat: add bedrock opus 4.5 (#644)

This commit is contained in:
Ari Webb
2026-01-22 15:48:23 -08:00
committed by GitHub
parent 4997337254
commit 5394c476af
2 changed files with 32 additions and 0 deletions

View File

@@ -37,6 +37,7 @@ function buildModelSettings(
const isGoogleAI = modelHandle.startsWith("google_ai/");
const isGoogleVertex = modelHandle.startsWith("google_vertex/");
const isOpenRouter = modelHandle.startsWith("openrouter/");
const isBedrock = modelHandle.startsWith("bedrock/");
let settings: ModelSettings;
@@ -111,6 +112,25 @@ function buildModelSettings(
updateArgs.temperature as number;
}
settings = googleVertexSettings;
} else if (isBedrock) {
// AWS Bedrock - supports Anthropic Claude models with thinking config
const bedrockSettings: Record<string, unknown> = {
provider_type: "bedrock",
parallel_tool_calls: true,
};
// Build thinking config if either enable_reasoner or max_reasoning_tokens is specified
if (
updateArgs?.enable_reasoner !== undefined ||
typeof updateArgs?.max_reasoning_tokens === "number"
) {
bedrockSettings.thinking = {
type: updateArgs?.enable_reasoner === false ? "disabled" : "enabled",
...(typeof updateArgs?.max_reasoning_tokens === "number" && {
budget_tokens: updateArgs.max_reasoning_tokens,
}),
};
}
settings = bedrockSettings;
} else {
// For BYOK/unknown providers, return generic settings with parallel_tool_calls
settings = {};

View File

@@ -35,6 +35,18 @@
"max_reasoning_tokens": 31999
}
},
{
"id": "bedrock-opus",
"handle": "bedrock/us.anthropic.claude-opus-4-5-20251101-v1:0",
"label": "Bedrock Claude Opus 4.5",
"description": "Anthropic's best model (via AWS Bedrock)",
"isFeatured": true,
"updateArgs": {
"context_window": 180000,
"max_output_tokens": 64000,
"max_reasoning_tokens": 31999
}
},
{
"id": "haiku",
"handle": "anthropic/claude-haiku-4-5-20251001",