feat: upgrade claude-agent-sdk to 0.2.x and add Opus 4.6 models#390
feat: upgrade claude-agent-sdk to 0.2.x and add Opus 4.6 models#390vadimtrunov wants to merge 3 commits into
Conversation
Upgrade @anthropic-ai/claude-agent-sdk from ^0.1.29 to ^0.2.42 so the SDK resolves the "opus" model alias to Claude Opus 4.6 (the latest). Add opus-4.6 and opus-4.6-thinking to Cursor model options. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 WalkthroughUpdated references and configuration to add Claude Opus 4.6 support: documentation updates, new CURSOR_MODEL options for Opus 4.6, and an upgrade of the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
Subagent (Task/Explore) results were rendered as raw JSON
`[{"type":"text","text":"..."}]` with literal `\n` instead of
formatted markdown. The root cause was that the API sometimes
returns content blocks as a serialized JSON string rather than
a parsed array. The existing `Array.isArray()` check missed this
case and fell through to `String()`, displaying raw JSON.
Now the Task tool result handler tries to JSON.parse string content
before checking for array structure, matching the pattern already
used by exit_plan_mode.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Hey @vadimtrunov, thanks for the PR! can you resolve the conflicts? |
There was a problem hiding this comment.
Pull request overview
This PR updates the project’s Anthropic agent SDK dependency and surfaces the latest Claude Opus 4.6 model options in the UI-facing model lists and documentation.
Changes:
- Upgraded
@anthropic-ai/claude-agent-sdkto^0.2.42(intended to make theopusalias resolve to Claude Opus 4.6). - Added
opus-4.6andopus-4.6-thinkingto Cursor model options. - Updated README/docs/JSDoc references from Opus 4.5 to Opus 4.6.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| shared/modelConstants.js | Adds Cursor model options for Opus 4.6 (standard + thinking) and updates model-format comment. |
| server/routes/agent.js | Updates the endpoint JSDoc to mention opus-4.6 in Cursor model identifiers. |
| package.json | Bumps @anthropic-ai/claude-agent-sdk to ^0.2.42. |
| package-lock.json | Updates the lockfile for the new SDK version (and resulting dependency graph changes). |
| README.md | Updates documented model compatibility to Opus 4.6. |
| README.zh-CN.md | Updates documented model compatibility to Opus 4.6 (Chinese README). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Keep claude-agent-sdk ^0.2.42 (PR upgrade target) while merging all other upstream/main changes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Conflicts resolved and pushed. Thanks for the review! |
|
@vadimtrunov I verified that this PR was not using opus 4.6 and sonnet 4.6. I have submitted a new PR (#446) that addresses this. |
Summary
@anthropic-ai/claude-agent-sdkfrom^0.1.29to^0.2.42so the SDK resolves theopusmodel alias to Claude Opus 4.6 (the latest)opus-4.6andopus-4.6-thinkingto Cursor model options inmodelConstants.js🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation
Chores