Repository navigation
fix(mcp): replace retired claude-sonnet-4-5 as the default Anthropic model - #1754
pcbeingused333 wants to merge 5 commits into
Conversation
…model Anthropic retires claude-sonnet-4-5 on 2026-11-30, after which the embedded agents fail with a model-not-found error unless ANTHROPIC_MODEL is set. Use claude-sonnet-5-5 as the default and update the CLI usage text. No sampling parameters are sent, so the new model needs no other change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Alex Castillo <alex.castillog33@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
|
||
| // Default configuration constants | ||
| const DEFAULT_ANTHROPIC_MODEL = "claude-sonnet-4-5"; | ||
| const DEFAULT_ANTHROPIC_MODEL = "claude-sonnet-4-6"; |
Review feedback: use the newest Sonnet instead of 4-6, and keep only the default-model test (the ANTHROPIC_MODEL cases exercise the SDK, not this code). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Alex Castillo <alex.castillog33@gmail.com>
It only pinned the constant. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Alex Castillo <alex.castillog33@gmail.com>
|
Switched to claude-sonnet-5-5. Dropped the test file: pinning the constant adds nothing. This comment was drafted with Claude Code. |
…lt-model # Conflicts: # packages/mcp-server/src/cli/usage.ts
Head branch was pushed to by a user without write access
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 494708e. Configure here.
@ai-sdk/anthropic 3.0.33 does not know claude-sonnet-5-5. It treats it as
an unknown model, so structured output falls back to a hidden json tool
with tool_choice {type: "any"} on every step and max_tokens 4096. Sonnet
5.5 rejects forced tool choice with a 400, so every Anthropic-backed
embedded agent call would fail.
3.0.137 (latest ai-v6) knows the model: it sends native
output_config.format, tool_choice auto, no sampling params, and a 128k
max_tokens. Also fix the stale Anthropic default in embedded-agents.md.
Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
|
@sentry-junior[bot] is attempting to deploy a commit to the Sentry Team on Vercel. A member of the Team first needs to authorize it. |
…1804) Pull requests from forks always fail three `Test` jobs, `sentry`, `NPM package (sentry)` and `CLI asset catalog (macOS arm64)`, plus the aggregate `test` job. The cause isn't the PR's code: `vars.SENTRY_CLIENT_ID` is empty on fork `pull_request` runs, so `packages/cli/script/build.ts` and `bundle.ts` exit with `SENTRY_CLIENT_ID environment variable is required`. Evidence: - In the #1754 run [41461213614](https://github.com/getsentry/toolkit/actions/runs/41461213614), the step env shows `SENTRY_CLIENT_ID:` with no value, and all three jobs stop on that error. - The other recent fork runs that included the CLI, [41430282402](https://github.com/getsentry/toolkit/actions/runs/41430282402) and [41122572999](https://github.com/getsentry/toolkit/actions/runs/41122572999), fail the same jobs. Same-repo PR runs from the same day pass. ### Change - In `test.yml`, `SENTRY_CLIENT_ID` now falls back to `test-client-id` in the three CLI build jobs. Local E2E and the CLI unit tests already use that placeholder. When the repository variable is set, it still wins. - `test.yml` uploads and publishes nothing, so the placeholder never ships. Release builds go through `cli-build.yml`, which this PR doesn't touch. - `docs/operations/github-actions.md` gets a short note on the fallback. ### Verification - Locally, `SENTRY_CLIENT_ID= pnpm --filter sentry run bundle` reproduces the CI error. With `SENTRY_CLIENT_ID=test-client-id`, the bundle completes. - `pnpm run lint` and `pnpm run docs:check` pass. After this merges, #1754 needs `main` merged in (or a new push) to pick up the workflow change. <!-- junior-request-attribution:start --> via @BYK. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:local%3Aweb%3Ac7729b8a4160db0aeba2f707 --> -- [View Session in Sentry](https://sentry.sentry.io/explore/conversations/local%3Aweb%3Ac7729b8a4160db0aeba2f707/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: BYK <126780+BYK@users.noreply.github.com>

Anthropic retires
claude-sonnet-4-5on 2026-11-30 (model deprecations). After that date, embedded agents fail with a model-not-found error unlessANTHROPIC_MODELis set. This PR switches the default toclaude-sonnet-5-5, Anthropic's recommended replacement.Changes
claude-sonnet-5-5in the provider constant, its doc comment, thesentry mcp --anthropic-modelusage text and themcp.mdskill reference.@ai-sdk/anthropic^3.0.33→^3.0.137(currentai-v6tag). This bump is required. 3.0.33 doesn't knowclaude-sonnet-5-5, so it handlesOutput.objectwith a hiddenjsontool and sendstool_choice: {type: "any"}on every step, including thetoolChoice: "none"finalize step. It also capsmax_tokensat 4096. Sonnet 5.5 rejects forced tool choice with a 400, so every Anthropic-backed embedded agent call would fail. 3.0.137 knows the model: it sendstool_choiceasauto, ornoneon the finalize step, uses nativeoutput_config.formatfor structured output, sends no sampling params, setsmax_tokens: 128000, and passes thinking blocks back unchanged in the tool loop.docs/operations/embedded-agents.md.Verification
fetch, using the samegenerateText+Output.object+prepareStepsetup ascallEmbeddedAgent, on both SDK versions (results above).pnpm run tsc,pnpm run lintand the@sentry/mcp-coretests pass.Behavior note
Sonnet 5.5 runs adaptive thinking by default. The Anthropic provider passes no provider options, so embedded agent steps may use more tokens and take longer than on 4.5. Setting
thinking: { type: "between_tools" }would turn off up-front thinking if that matters. It's left out of this PR.Drafted with Claude Code assistance.
via @BYK.
--
View Session in Sentry