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
6 changes: 3 additions & 3 deletions packages/types/src/providers/openrouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const OPEN_ROUTER_PROMPT_CACHING_MODELS = new Set([
"anthropic/claude-3.7-sonnet:beta",
"anthropic/claude-3.7-sonnet:thinking",
"anthropic/claude-sonnet-4",
"anthropic/claude-4.5-sonnet",
"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.

[P3] The corrected ID matches OpenRouter’s Anthropic naming convention. Consider adding a brief comment above these sets to document the expected pattern (e.g., anthropic/claude-sonnet-4.x) to prevent regressions.

"anthropic/claude-opus-4",
"anthropic/claude-opus-4.1",
"google/gemini-2.5-flash-preview",
Expand All @@ -60,7 +60,7 @@ export const OPEN_ROUTER_COMPUTER_USE_MODELS = new Set([
"anthropic/claude-3.7-sonnet:beta",
"anthropic/claude-3.7-sonnet:thinking",
"anthropic/claude-sonnet-4",
"anthropic/claude-4.5-sonnet",
"anthropic/claude-sonnet-4.5",
"anthropic/claude-opus-4",
"anthropic/claude-opus-4.1",
])
Expand All @@ -83,7 +83,7 @@ export const OPEN_ROUTER_REASONING_BUDGET_MODELS = new Set([
"anthropic/claude-opus-4",
"anthropic/claude-opus-4.1",
"anthropic/claude-sonnet-4",
"anthropic/claude-4.5-sonnet",
"anthropic/claude-sonnet-4.5",
"google/gemini-2.5-pro-preview",
"google/gemini-2.5-pro",
"google/gemini-2.5-flash-preview-05-20",
Expand Down
6 changes: 3 additions & 3 deletions src/api/providers/fetchers/__tests__/openrouter.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe("OpenRouter API", () => {
"google/gemini-2.5-flash", // OpenRouter doesn't report this as supporting prompt caching
"google/gemini-2.5-flash-lite-preview-06-17", // OpenRouter doesn't report this as supporting prompt caching
"anthropic/claude-opus-4.1", // Not yet available in OpenRouter API
"anthropic/claude-4.5-sonnet", // Not yet available in OpenRouter API
"anthropic/claude-sonnet-4.5", // Not yet available in OpenRouter API
Copy link

Choose a reason for hiding this comment

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

[P3] This model ID is excluded in several places below as well. To avoid drift, consider extracting shared exclusions (like anthropic/claude-sonnet-4.5 while unavailable) into a single constant used across these sections.

])

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

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

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

const expectedReasoningBudgetModels = Array.from(OPEN_ROUTER_REASONING_BUDGET_MODELS)
Expand Down
Loading