Skip to content

Commit cdc8452

Browse files
committed
bedrock: remove topP globally; update tests; revert unrelated OpenRouter model renames
1 parent e7b5a99 commit cdc8452

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

packages/types/src/providers/openrouter.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const OPEN_ROUTER_PROMPT_CACHING_MODELS = new Set([
3838
"anthropic/claude-3.7-sonnet:beta",
3939
"anthropic/claude-3.7-sonnet:thinking",
4040
"anthropic/claude-sonnet-4",
41-
"anthropic/claude-sonnet-4.5",
41+
"anthropic/claude-4.5-sonnet",
4242
"anthropic/claude-opus-4",
4343
"anthropic/claude-opus-4.1",
4444
"google/gemini-2.5-flash-preview",
@@ -60,7 +60,7 @@ export const OPEN_ROUTER_COMPUTER_USE_MODELS = new Set([
6060
"anthropic/claude-3.7-sonnet:beta",
6161
"anthropic/claude-3.7-sonnet:thinking",
6262
"anthropic/claude-sonnet-4",
63-
"anthropic/claude-sonnet-4.5",
63+
"anthropic/claude-4.5-sonnet",
6464
"anthropic/claude-opus-4",
6565
"anthropic/claude-opus-4.1",
6666
])
@@ -83,7 +83,7 @@ export const OPEN_ROUTER_REASONING_BUDGET_MODELS = new Set([
8383
"anthropic/claude-opus-4",
8484
"anthropic/claude-opus-4.1",
8585
"anthropic/claude-sonnet-4",
86-
"anthropic/claude-sonnet-4.5",
86+
"anthropic/claude-4.5-sonnet",
8787
"google/gemini-2.5-pro-preview",
8888
"google/gemini-2.5-pro",
8989
"google/gemini-2.5-flash-preview-05-20",

src/api/providers/__tests__/bedrock-reasoning.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ describe("AwsBedrockHandler - Extended Thinking", () => {
182182
)
183183
})
184184

185-
it("should include topP when thinking is disabled", async () => {
185+
it("should not include topP when thinking is disabled (global removal)", async () => {
186186
handler = new AwsBedrockHandler({
187187
apiProvider: "bedrock",
188188
apiModelId: "anthropic.claude-3-7-sonnet-20250219-v1:0",
@@ -216,10 +216,10 @@ describe("AwsBedrockHandler - Extended Thinking", () => {
216216
chunks.push(chunk)
217217
}
218218

219-
// Verify that topP IS present when thinking is disabled
219+
// Verify that topP is NOT present for any model (removed globally)
220220
expect(mockSend).toHaveBeenCalledTimes(1)
221221
expect(capturedPayload).toBeDefined()
222-
expect(capturedPayload.inferenceConfig).toHaveProperty("topP", 0.1)
222+
expect(capturedPayload.inferenceConfig).not.toHaveProperty("topP")
223223

224224
// Verify that additionalModelRequestFields is not present or empty
225225
expect(capturedPayload.additionalModelRequestFields).toBeUndefined()

src/api/providers/fetchers/__tests__/openrouter.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ describe("OpenRouter API", () => {
3434
"google/gemini-2.5-flash", // OpenRouter doesn't report this as supporting prompt caching
3535
"google/gemini-2.5-flash-lite-preview-06-17", // OpenRouter doesn't report this as supporting prompt caching
3636
"anthropic/claude-opus-4.1", // Not yet available in OpenRouter API
37-
"anthropic/claude-sonnet-4.5", // Not yet available in OpenRouter API
37+
"anthropic/claude-4.5-sonnet", // Not yet available in OpenRouter API
3838
])
3939

4040
const ourCachingModels = Array.from(OPEN_ROUTER_PROMPT_CACHING_MODELS).filter(
@@ -53,7 +53,7 @@ describe("OpenRouter API", () => {
5353

5454
const excludedComputerUseModels = new Set([
5555
"anthropic/claude-opus-4.1", // Not yet available in OpenRouter API
56-
"anthropic/claude-sonnet-4.5", // Not yet available in OpenRouter API
56+
"anthropic/claude-4.5-sonnet", // Not yet available in OpenRouter API
5757
])
5858

5959
const expectedComputerUseModels = Array.from(OPEN_ROUTER_COMPUTER_USE_MODELS)
@@ -136,7 +136,7 @@ describe("OpenRouter API", () => {
136136
"google/gemini-2.5-flash-lite-preview-06-17",
137137
"google/gemini-2.5-pro",
138138
"anthropic/claude-opus-4.1", // Not yet available in OpenRouter API
139-
"anthropic/claude-sonnet-4.5", // Not yet available in OpenRouter API
139+
"anthropic/claude-4.5-sonnet", // Not yet available in OpenRouter API
140140
])
141141

142142
const expectedReasoningBudgetModels = Array.from(OPEN_ROUTER_REASONING_BUDGET_MODELS)

0 commit comments

Comments
 (0)