Repository navigation
Conversation
The Anthropic adapter picks the extended-thinking request format from a list of model-name prefixes. That list stopped at Opus 4.8, so Claude 5 models (for example claude-opus-5-5) fell back to the older token-budget format. These models reject that format, so sessions on them showed no reasoning. Add the Opus 5, Sonnet 5, and Fable 5 family prefixes to the adaptive list. A family prefix covers every 5.x release and dated snapshot, so a new point release does not need another list update. Extend the thinking-config test to cover these models and update the doc comments that list the adaptive families. Fixes stacklok#2084
dkoryto
marked this pull request as ready for review
October 5, 2026 11:55
Contributor
|
Thanks for this! Looks like there are some CI issues with this PR. I'm investigating this right now and I may take your PR or just steal things from it and give you credit. |
Contributor
|
#2084 is tracking this. |
This was referenced Oct 5, 2026
jbeda
added a commit
that referenced
this pull request
Oct 6, 2026
…espace Credit community PR #2100 for the bare Opus/Sonnet/Fable 5 prefix slice; extend it to Mythos 5, exact anthropic/ IDs, and sparse-discovery proofs. Co-authored-by: Mecatl <[email protected]>
ChrisJBurns
approved these changes
Oct 16, 2026
This branch has not been deployed
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
Sessions on Claude 5 models (for example
claude-opus-5-5) routed through theanthropicprovider showed no reasoning.The adapter picks the extended-thinking request format from the prefix list in
adaptiveThinkingPrefixes(provider/anthropic/request.go). That list stopped at Opus 4.8. Claude 5 models didn't match it, so they fell back to the olderbudget_tokensformat, which these models reject.Change
claude-opus-5,claude-sonnet-5, andclaude-fable-5family prefixes to the adaptive list. One family prefix covers every 5.x release and dated snapshot, so a new point release won't need another update.claude-mythos-5prefix because no such model is in the curated catalog.TestThinkingConfigModelAwareto cover Claude 5 models.The live capability lookup still takes precedence. This change only fixes the offline fallback that every other Anthropic-protocol provider entry relies on.
Verification
go test ./inprovider/anthropic. The new cases failed before the fix and pass after it.golangci-lint(pinned v2.13.1, repository config) onprovider/anthropic: 0 issues.main,claude-opus-5-5,claude-sonnet-5-5, andclaude-fable-5-1sentthinking: {type: "enabled", budget_tokens: 4095}. With this change they sendthinking: {type: "adaptive"}, and the streamed reasoning reaches the provider output.claude-opus-4-8was unchanged in both runs.claude-opus-5-5with a short reasoning prompt, sent through the provider.thinkingsentmain{type: "enabled", budget_tokens: ...}400 invalid_request_error: "thinking.type.enabled" is not supported for this model. Use "thinking.type.adaptive" and "output_config.effort" to control thinking behavior.{type: "adaptive"}This answers the open question in the issue. Before this change, the request failed with an API error. It wasn't a successful response with the reasoning missing.
Repository gates (local, macOS 26.6.2 arm64)
GOOS=linux task lint: 0 issues in every module. Plaintask linton macOS reports 3 staticcheck findings ininternal/executionexecutorandcmd/mecatl-executor. They already exist onmainand are unrelated to this change; filed as task lint fails on macOS: staticcheck SA4023 in execution executor non-Linux stub #2101.task test:race:provider/anthropicand every package that imports it pass. The suite still fails locally in 10 packages outside this change (microVM,executionexecutor,internal/app,internal/adapter/server,cmd/mecated,cmd/mecatui,deploy/mecatl-execution-kind). I reran all 21 failing tests on a cleanmainworktree:main. These are macOS environment issues, for example/dev/fdsocket paths, macOS x509 verification, and Linux-only executor paths.cmd/mecatui/agenthook,cmd/mecatui/customization,environment/microvm/guestexec,internal/adapter/microvmmanager).go run ./cmd/mecademo: shows the tool call, permission ask and approval, and result.Possible follow-ups (not in this PR)
output_config.effort. Check whether the adaptive path sends the configured reasoning effort.Fixes #2084