Skip to content

Conversation

@hannesrudolph
Copy link
Collaborator

@hannesrudolph hannesrudolph commented Oct 29, 2025

Updated defaults to Sonnet 4.5 where clearly available.

Updated:

  • Anthropic → claude-sonnet-4-5 (packages/types/src/providers/anthropic.ts)
  • Bedrock → anthropic.claude-sonnet-4-5-20250929-v1:0 (packages/types/src/providers/bedrock.ts)
  • OpenRouter → anthropic/claude-sonnet-4.5 (packages/types/src/providers/openrouter.ts)
  • Claude Code → claude-sonnet-4-5 (packages/types/src/providers/claude-code.ts)
  • Unbound → anthropic/claude-sonnet-4-5 (packages/types/src/providers/unbound.ts)
  • Vertex already 4.5

Left unchanged (no clear 4.5 availability):

  • Vercel AI Gateway → anthropic/claude-sonnet-4
  • Requesty → coding/claude-4-sonnet
  • Glama → anthropic/claude-3-7-sonnet
  • LiteLLM → claude-3-7-sonnet-20250219
  • Others unchanged

Also updated tests and UI default expectations to match.

All targeted tests pass locally.

…ck, OpenRouter, Claude Code, and Unbound; update tests
Copilot AI review requested due to automatic review settings October 29, 2025 21:49
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. enhancement New feature or request labels Oct 29, 2025
@roomote
Copy link

roomote bot commented Oct 29, 2025

Review Summary

All previously flagged issues have been resolved:

  • Update mock data in openrouter.spec.ts to include the new default model anthropic/claude-sonnet-4.5
  • Update mock data in unbound.spec.ts to include the new default model anthropic/claude-sonnet-4-5

Follow Along on Roo Code Cloud

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates default model IDs across multiple providers from older Claude Sonnet 4 versions to the newer Claude Sonnet 4.5 release. The changes ensure consistency across the codebase by updating configuration constants and their corresponding test expectations.

  • Updated default model IDs to "claude-sonnet-4-5" variants across Anthropic, Bedrock, Claude Code, Unbound, and OpenRouter providers
  • Modified test assertions to expect the new default model IDs
  • Maintained naming convention consistency with each provider's format (e.g., dots for OpenRouter, hyphens for others)

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/types/src/providers/anthropic.ts Changed default model from "claude-sonnet-4-20250514" to "claude-sonnet-4-5"
packages/types/src/providers/bedrock.ts Updated default to "anthropic.claude-sonnet-4-5-20250929-v1:0"
packages/types/src/providers/claude-code.ts Changed default to "claude-sonnet-4-5"
packages/types/src/providers/openrouter.ts Updated default to "anthropic/claude-sonnet-4.5" (dot notation)
packages/types/src/providers/unbound.ts Changed default to "anthropic/claude-sonnet-4-5"
src/api/providers/tests/claude-code.spec.ts Updated test expectations to match new default
src/api/providers/tests/openrouter.spec.ts Updated test expectations to match new default
src/api/providers/tests/unbound.spec.ts Updated test expectations to match new default
webview-ui/src/components/ui/hooks/tests/useSelectedModel.spec.ts Updated test expectations to match new defaults

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

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.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Oct 29, 2025
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Oct 29, 2025
@hannesrudolph
Copy link
Collaborator Author

Addressed review feedback:\n\n- Updated mock data to include new defaults:\n - anthropic/claude-sonnet-4.5 in src/api/providers/tests/openrouter.spec.ts\n - anthropic/claude-sonnet-4-5 in src/api/providers/tests/unbound.spec.ts\n\nVerification:\n- Ran targeted tests locally and they pass: src/api/providers/tests/openrouter.spec.ts, src/api/providers/tests/unbound.spec.ts\n- Pushed changes; CI checks are now running. Will monitor and confirm once green.

@hannesrudolph hannesrudolph moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Oct 30, 2025
@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Oct 30, 2025
@hannesrudolph
Copy link
Collaborator Author

@roomote fix those issues you have identified

@roomote
Copy link

roomote bot commented Nov 4, 2025

See this task on Roo Code Cloud

All previously identified issues have already been resolved in this PR:

✅ Mock data for anthropic/claude-sonnet-4.5 added to openrouter.spec.ts
✅ Mock data for anthropic/claude-sonnet-4-5 added to unbound.spec.ts

All related tests are passing:

  • openrouter.spec.ts: 22 tests ✓
  • unbound.spec.ts: included above ✓
  • claude-code.spec.ts: 14 tests ✓
  • useSelectedModel.spec.ts: 14 tests ✓

No further changes needed.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 4, 2025
@mrubens mrubens merged commit ea33973 into main Nov 5, 2025
18 checks passed
@mrubens mrubens deleted the feat/sonnet-4-5-defaults branch November 5, 2025 03:07
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Nov 5, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Prelim Review] to Done in Roo Code Roadmap Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer PR - Needs Preliminary Review size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants