Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion packages/types/src/providers/anthropic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { ModelInfo } from "../model.js"
// https://docs.anthropic.com/en/docs/about-claude/models

export type AnthropicModelId = keyof typeof anthropicModels
export const anthropicDefaultModelId: AnthropicModelId = "claude-sonnet-4-20250514"
export const anthropicDefaultModelId: AnthropicModelId = "claude-sonnet-4-5"

export const anthropicModels = {
"claude-sonnet-4-5": {
Expand Down
2 changes: 1 addition & 1 deletion packages/types/src/providers/bedrock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { ModelInfo } from "../model.js"

export type BedrockModelId = keyof typeof bedrockModels

export const bedrockDefaultModelId: BedrockModelId = "anthropic.claude-sonnet-4-20250514-v1:0"
export const bedrockDefaultModelId: BedrockModelId = "anthropic.claude-sonnet-4-5-20250929-v1:0"

export const bedrockDefaultPromptRouterModelId: BedrockModelId = "anthropic.claude-3-sonnet-20240229-v1:0"

Expand Down
2 changes: 1 addition & 1 deletion packages/types/src/providers/claude-code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function convertModelNameForVertex(modelName: string): string {

// Claude Code
export type ClaudeCodeModelId = keyof typeof claudeCodeModels
export const claudeCodeDefaultModelId: ClaudeCodeModelId = "claude-sonnet-4-20250514"
export const claudeCodeDefaultModelId: ClaudeCodeModelId = "claude-sonnet-4-5"
export const CLAUDE_CODE_DEFAULT_MAX_OUTPUT_TOKENS = 16000

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/types/src/providers/openrouter.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ModelInfo } from "../model.js"

// https://openrouter.ai/models?order=newest&supported_parameters=tools
export const openRouterDefaultModelId = "anthropic/claude-sonnet-4"
export const openRouterDefaultModelId = "anthropic/claude-sonnet-4.5"

export const openRouterDefaultModelInfo: ModelInfo = {
maxTokens: 8192,
Expand Down
2 changes: 1 addition & 1 deletion packages/types/src/providers/unbound.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ModelInfo } from "../model.js"

export const unboundDefaultModelId = "anthropic/claude-3-7-sonnet-20250219"
export const unboundDefaultModelId = "anthropic/claude-sonnet-4-5"

export const unboundDefaultModelInfo: ModelInfo = {
maxTokens: 8192,
Expand Down
4 changes: 2 additions & 2 deletions src/api/providers/__tests__/claude-code.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe("ClaudeCodeHandler", () => {
const handlerWithInvalidModel = new ClaudeCodeHandler(options)
const model = handlerWithInvalidModel.getModel()

expect(model.id).toBe("claude-sonnet-4-20250514") // default model
expect(model.id).toBe("claude-sonnet-4-5") // default model
})

test("should override maxTokens when claudeCodeMaxOutputTokens is provided", () => {
Expand All @@ -69,7 +69,7 @@ describe("ClaudeCodeHandler", () => {
const handlerWithMaxTokens = new ClaudeCodeHandler(options)
const model = handlerWithMaxTokens.getModel()

expect(model.id).toBe("claude-sonnet-4-20250514") // default model
expect(model.id).toBe("claude-sonnet-4-5") // default model
expect(model.info.maxTokens).toBe(16384) // Should use the configured value
})

Expand Down
2 changes: 1 addition & 1 deletion src/api/providers/__tests__/openrouter.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ describe("OpenRouterHandler", () => {
it("returns default model info when options are not provided", async () => {
const handler = new OpenRouterHandler({})
const result = await handler.fetchModel()
expect(result.id).toBe("anthropic/claude-sonnet-4")
expect(result.id).toBe("anthropic/claude-sonnet-4.5")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test expects the new default model anthropic/claude-sonnet-4.5, but the mock data in getModels (lines 17-44) doesn't include this model. The mock only includes anthropic/claude-sonnet-4. This mismatch will cause the test to either fail or return undefined model info when it should return valid model information.

expect(result.info.supportsPromptCache).toBe(true)
})

Expand Down
2 changes: 1 addition & 1 deletion src/api/providers/__tests__/unbound.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ describe("UnboundHandler", () => {
it("should return default model when invalid model provided", async () => {
const handlerWithInvalidModel = new UnboundHandler({ ...mockOptions, unboundModelId: "invalid/model" })
const modelInfo = await handlerWithInvalidModel.fetchModel()
expect(modelInfo.id).toBe("anthropic/claude-3-7-sonnet-20250219")
expect(modelInfo.id).toBe("anthropic/claude-sonnet-4-5")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test expects the new default model anthropic/claude-sonnet-4-5, but the mock data in getModels (lines 11-57) doesn't include this model. The mock includes anthropic/claude-3-5-sonnet-20241022 and anthropic/claude-3-7-sonnet-20250219, but not the new default. This will cause the test to fail or return incorrect model info when testing the fallback to the default model.

expect(modelInfo.info).toBeDefined()
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ describe("useSelectedModel", () => {
const { result } = renderHook(() => useSelectedModel(), { wrapper })

expect(result.current.provider).toBe("anthropic")
expect(result.current.id).toBe("claude-sonnet-4-20250514")
expect(result.current.id).toBe("claude-sonnet-4-5")
expect(result.current.info).toBeUndefined()
})
})
Expand Down Expand Up @@ -439,7 +439,7 @@ describe("useSelectedModel", () => {
const { result } = renderHook(() => useSelectedModel(apiConfiguration), { wrapper })

expect(result.current.provider).toBe("claude-code")
expect(result.current.id).toBe("claude-sonnet-4-20250514") // Default model
expect(result.current.id).toBe("claude-sonnet-4-5") // Default model
expect(result.current.info).toBeDefined()
expect(result.current.info?.supportsImages).toBe(false)
})
Expand Down
Loading