Repository navigation
Fix #1906: raise claude-agent-sdk floor to ^0.2.141 - #1907
Closed
waleedkadous wants to merge 7 commits into
Closed
waleedkadous wants to merge 7 commits into
waleedkadous wants to merge 7 commits into
Conversation
The repo lockfile resolved @anthropic-ai/claude-agent-sdk ^0.2.41 to 0.2.105, whose bundled Claude Code CLI only sends adaptive thinking to opus-4-6/sonnet-4-6 and sends thinking.type.enabled to any other Opus. claude-opus-5 rejects that with API 400, so the claude lane failed in worktree/local builds while the published install (fresh resolve to 0.2.141) worked. Raise the floor to ^0.2.141 (what fresh installs already run) and refresh the lockfile. The regression test pins both the installed SDK version and the declared floor.
Contributor
Author
|
Thank you, clean and well-scoped, and running the claude review on the worktree build is the right proof. One small fold-in before merge, under the owner's fix-in-place rule: your non-blocking note (1). Please log the Agent SDK version on the claude lane next to the existing The 0.3.x migration is a real follow-up and stays out of this PR. |
Name the @anthropic-ai/claude-agent-sdk version beside the [CLAUDE] auth line, as the codex lane does for its CLI, so an SDK too old for the configured model shows in the output. The floor test now reads the version through the same helper and pins the line.
Contributor
Author
|
Closing on the owner's ruling (decision main-19, 2026-11-17): the claude lane is moving off the Agent SDK to the installed claude CLI (issue #1912), which supersedes this floor raise. Thank you for the clean diagnosis; it is the reason for that change. Branch kept. |
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.
Summary
Builds from this repo's lockfile ran
@anthropic-ai/claude-agent-sdk0.2.105, and consult's claude lane got API 400"thinking.type.enabled" is not supported for this modelonclaude-opus-5. This raises the declared floor to^0.2.141, refreshes the lockfile, and adds a regression test.Fixes #1906
Root Cause
packages/codev/package.jsondeclared^0.2.41andpnpm-lock.yamlresolved it to 0.2.105, which bundles Claude Code 2.1.105. That CLI decides which models get adaptive thinking from a name allowlist (opus-4-6,sonnet-4-6), and sends{type: "enabled", budget_tokens}to any other Opus.claude-opus-5accepts only adaptive, so it returns a 400.Reproduced from this worktree (direct SDK
query(),claude-opus-5, trivial prompt):Consult sets no thinking option itself, and setting one would not help: on a model it doesn't recognise, the 2.1.105 CLI rewrites
adaptivetoenabled. The SDK is the component that knows model capabilities, so consult is unchanged.Release exposure: fresh installs are not affected.
pnpm publishships the version range, not the lockfile, andlocal-installrunsnpm install -gon the tarball, so both resolve fresh. A caret on 0.x pins the minor, so they get 0.2.141, the last 0.2.x; 0.3.x is never picked. The exposure is any install whose own lockfile already resolved an older 0.2.x, and the new floor closes that.Fix
packages/codev/package.json:^0.2.41→^0.2.141, the version every fresh install already runs.pnpm-lock.yaml: refreshed. The diff stays inside the SDK's own subtree: the SDK and its per-platform native-binary packages,@anthropic-ai/sdk0.81 → 0.93, and the@img/sharp-*optionals that 0.2.105 pulled in and 0.2.141 dropped.consult/index.ts: the claude lane now logs[CLAUDE] agent sdk: @anthropic-ai/claude-agent-sdk <version> bundled with codevbeside the auth line, the same way the codex lane logs its CLI version, so the next version mismatch shows up in the output (architect fold-in). Verified live:… 0.2.141 bundled with codev.Moving to 0.3.x is out of scope; it is a breaking-range bump.
Test Plan
consult/__tests__/bugfix-1906-claude-sdk-floor.test.tschecks that the installed SDK and the declared floor are both ≥ 0.2.141, and pins the default model it was probed against. Fails without the fix (lockfile and manifest restored tomain, frozen install: 2 failed, 0.2.105 /^0.2.41) and passes with it.consult -m claude --prompt …onclaude-opus-5overANTHROPIC_API_KEYreturned the 400 before the fix and a review after it (12.7s).build+testschecks)