Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for the new Claude Opus 5 model identifier across the TypeScript SDK, CLI, and Python SDK, ensuring consistent model enums/options and basic validation coverage.
Changes:
- Added Opus 5 enum constants to model type definitions in JS/TS and Python.
- Exposed Opus 5 in the CLI’s
MODEL_OPTIONS_BY_AGENTand added CLI/unit tests to assert the new options. - Updated SDK docs and release metadata (changeset + Python changelog) to reflect the new model.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/sdk/src/types.ts | Adds Opus_5 / Claude_Opus_5 constants to SDK model enums. |
| packages/sdk/src/tests/types.test.ts | Adds unit assertions for Opus 5 model identifier strings across enums. |
| packages/sdk/src/tests/integration/configure-model.integration.test.ts | Updates integration coverage to exercise configureModel with Opus 5. |
| packages/sdk/README.md | Documents the new ClaudeCode.Opus_5 and OpenRouterModel.Claude_Opus_5 entries. |
| packages/python-sdk/upstash_box/types.py | Mirrors Opus 5 enum constants in the Python SDK. |
| packages/python-sdk/tests/integration/test_lifecycle_async.py | Updates lifecycle integration test to configure a new model value. |
| packages/python-sdk/tests/_async/test_models.py | Adds unit test asserting Opus 5 identifier strings across Python enums. |
| packages/python-sdk/CHANGELOG.md | Notes Opus 5 constant additions in Python Unreleased. |
| packages/cli/src/models.ts | Adds Opus 5 to CLI model option groups for relevant agents/providers. |
| packages/cli/src/tests/models.test.ts | Adds test coverage asserting Opus 5 appears in CLI options. |
| .changeset/calm-owls-sing.md | Declares patch releases for @upstash/box and @upstash/box-cli. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+37
to
42
| it("changes to Opus 5 and reflects in modelConfig", async () => { | ||
| await box.configureModel(ClaudeCode.Opus_5); | ||
|
|
||
| const config = box.modelConfig; | ||
| expect(config.model).toBe(ClaudeCode.Opus_4_5); | ||
| expect(config.model).toBe(ClaudeCode.Opus_5); | ||
| }); |
Comment on lines
18
to
+20
| # configure_model updates model_config immediately | ||
| await box.configure_model(ClaudeCode.HAIKU_4_5.value) | ||
| assert box.model_config["model"] == ClaudeCode.HAIKU_4_5.value | ||
| await box.configure_model(ClaudeCode.OPUS_5.value) | ||
| assert box.model_config["model"] == ClaudeCode.OPUS_5.value |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.