Compare commits

...

2 Commits

Author SHA1 Message Date
Elephant Lumps 6f797d2488 changeset 2025-05-22 09:28:30 -07:00
Elephant Lumps 9b1907856a bedrock sonnet 4 support 2025-05-22 09:28:01 -07:00
4 changed files with 25 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"claude-dev": minor
---
Add Sonnet 4 to bedrock provider
+1 -1
View File
@@ -47,7 +47,7 @@ export class AwsBedrockHandler implements ApiHandler {
}
const budget_tokens = this.options.thinkingBudgetTokens || 0
const reasoningOn = baseModelId.includes("3-7") && budget_tokens !== 0 ? true : false
const reasoningOn = (baseModelId.includes("3-7") || baseModelId.includes("4-")) && budget_tokens !== 0 ? true : false
// Get model info and message indices for caching
const userMsgIndices = messages.reduce((acc, msg, index) => (msg.role === "user" ? [...acc, index] : acc), [] as number[])
+15 -1
View File
@@ -197,8 +197,22 @@ export const anthropicModels = {
// AWS Bedrock
// https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html
export type BedrockModelId = keyof typeof bedrockModels
export const bedrockDefaultModelId: BedrockModelId = "anthropic.claude-3-7-sonnet-20250219-v1:0"
export const bedrockDefaultModelId: BedrockModelId = "anthropic.claude-4-sonnet-20250522-v1:0"
export const bedrockModels = {
"anthropic.claude-4-sonnet-20250522-v1:0": {
maxTokens: 8192,
contextWindow: 200_000,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 3.0,
outputPrice: 15.0,
cacheWritesPrice: 3.75,
cacheReadsPrice: 0.3,
thinkingConfig: {
maxBudget: 64000,
outputPrice: 15.0,
},
},
"amazon.nova-premier-v1:0": {
maxTokens: 10_000,
contextWindow: 1_000_000,
@@ -894,8 +894,11 @@ const ApiOptions = ({
</div>
)}
{(selectedModelId === "anthropic.claude-3-7-sonnet-20250219-v1:0" ||
selectedModelId === "anthropic.claude-4-sonnet-20250522-v1:0" ||
(apiConfiguration?.awsBedrockCustomSelected &&
apiConfiguration?.awsBedrockCustomModelBaseId === "anthropic.claude-3-7-sonnet-20250219-v1:0")) && (
(apiConfiguration?.awsBedrockCustomModelBaseId === "anthropic.claude-3-7-sonnet-20250219-v1:0" ||
apiConfiguration?.awsBedrockCustomModelBaseId ===
"anthropic.claude-4-sonnet-20250522-v1:0"))) && (
<ThinkingBudgetSlider apiConfiguration={apiConfiguration} setApiConfiguration={setApiConfiguration} />
)}
<ModelInfoView