fix(providers): clamp unsupported temperatures in Claude Code provider#3961
Merged
theonlyhennygod merged 1 commit intozeroclaw-labs:masterfrom Mar 20, 2026
Merged
Conversation
Contributor
Author
|
I tried to fix these errors which I am seeing repeatedly when using the I've let Claude Code try to figure out a solution, but I realize this might not be the desired direction. |
The Claude Code CLI only supports temperatures 0.7 and 1.0, but internal subsystems (memory consolidation, context summarizer) use lower values like 0.1 and 0.2. Previously the provider rejected these with a hard error, triggering retries and WARN-level log noise. Clamp to the nearest supported value instead, since the CLI ignores temperature anyway. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
706526a to
34698db
Compare
theonlyhennygod
approved these changes
Mar 20, 2026
Collaborator
theonlyhennygod
left a comment
There was a problem hiding this comment.
LGTM. Clean approach to clamp unsupported temperatures to nearest supported value instead of hard-erroring, which unblocks callers like memory consolidation. Good test coverage.
5 tasks
webhive
pushed a commit
to webhive/zeroclaw
that referenced
this pull request
Mar 24, 2026
zeroclaw-labs#3961) The Claude Code CLI only supports temperatures 0.7 and 1.0, but internal subsystems (memory consolidation, context summarizer) use lower values like 0.1 and 0.2. Previously the provider rejected these with a hard error, triggering retries and WARN-level log noise. Clamp to the nearest supported value instead, since the CLI ignores temperature anyway. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
ReliableProviderTest plan
cargo test --lib providers::claude_code— 14/14 pass)zeroclaw daemonwithclaude-codeprovider and verify no temperature warnings on incoming messages🤖 Generated with Claude Code