Skip to content

feat: add Opus [1M] model option to model selector#612

Closed
gumab wants to merge 1 commit intositeboon:mainfrom
gumab:fix/add-opus-1m-model
Closed

feat: add Opus [1M] model option to model selector#612
gumab wants to merge 1 commit intositeboon:mainfrom
gumab:fix/add-opus-1m-model

Conversation

@gumab
Copy link
Copy Markdown

@gumab gumab commented Apr 2, 2026

Summary

  • Adds opus[1m] to CLAUDE_MODELS.OPTIONS in shared/modelConstants.js, alongside the existing sonnet[1m] entry
  • Allows users to select the Opus model with 1M context window from the UI model picker

Closes #579

Test plan

  • Verify Opus [1M] appears in the model selector dropdown
  • Verify selecting Opus [1M] correctly passes opus[1m] to the Claude SDK
  • Verify existing model options still work as expected

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added Claude Opus [1M] as a selectable model option in the model selection interface.
  • Documentation

    • Updated model-listing documentation and API docs to include the new Opus [1M] model option.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 0fd1ea4e-d6ba-453d-979e-dc45848ee664

📥 Commits

Reviewing files that changed from the base of the PR and between 44bdea5 and 3938daf.

📒 Files selected for processing (3)
  • server/claude-sdk.js
  • server/routes/agent.js
  • shared/modelConstants.js
✅ Files skipped from review due to trivial changes (3)
  • server/routes/agent.js
  • server/claude-sdk.js
  • shared/modelConstants.js

📝 Walkthrough

Walkthrough

Added a new Claude model option "opus[1m]" (label "Opus [1M]") to the model options and updated related inline documentation to list it as a supported model. No runtime logic or validation was changed.

Changes

Cohort / File(s) Summary
Model Options
shared/modelConstants.js
Inserted { value: "opus[1m]", label: "Opus [1M]" } into CLAUDE_MODELS.OPTIONS.
SDK Mapping Docs
server/claude-sdk.js
Updated comment/documentation in mapCliOptionsToSDK() to include opus[1m] as a valid sdkOptions.model value; no functional change.
API Docs
server/routes/agent.js
Updated inline API documentation for the model parameter to list opus[1m] among supported Claude model values; no functional change.

Poem

🐰
A tiny hop, a new choice found,
Opus 1M — now in the mound.
Tokens plenty, long and wide,
I nibble data with rabbit pride.
Hooray for models, one more to confide!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding an Opus [1M] model option to the model selector dropdown.
Linked Issues check ✅ Passed The pull request successfully implements all coding requirements from issue #579: adds opus[1m] entry to CLAUDE_MODELS.OPTIONS, updates model documentation in server files, and enables UI selection of Opus with 1M context.
Out of Scope Changes check ✅ Passed All changes are directly aligned with issue #579 objectives. The modifications to shared/modelConstants.js, server/claude-sdk.js, and server/routes/agent.js are all necessary to expose the Opus [1M] option in the UI.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Adds opus[1m] to the Claude model options alongside the existing sonnet[1m],
allowing users to select the Opus model with 1M context window.

Closes siteboon#579

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@gumab gumab force-pushed the fix/add-opus-1m-model branch from 44bdea5 to 3938daf Compare April 2, 2026 23:29
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@shared/modelConstants.js`:
- Line 21: The server-side "valid models" documentation and validation must be
updated to include the new opus[1m] model; locate the server-side places that
enumerate or comment valid models (search for constants or arrays like
VALID_MODELS / SUPPORTED_MODELS or functions named validateModel,
getSupportedModels, or model-checking middleware and the inline "valid models"
comment blocks) and add the opus[1m] entry (or its string "opus[1m]") to those
lists/comments and ensure any validation logic that filters/accepts models
recognizes the new string so runtime validation and docs stay in sync.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d3bfbfa5-4f66-4e6b-8420-e54e4ffef880

📥 Commits

Reviewing files that changed from the base of the PR and between 1628868 and 44bdea5.

📒 Files selected for processing (1)
  • shared/modelConstants.js

Comment thread shared/modelConstants.js
@viper151
Copy link
Copy Markdown
Contributor

Completed

@viper151 viper151 closed this Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Opus [1M] option to model picker

2 participants