Repository navigation
fix(ai): send the per-call sampling of LLMClient.chat - #3126
Merged
Merged
Conversation
LLMClient.chat and chat_messages took **kwargs and used none of them, so a caller's temperature, top_p and seed did not reach the request or the reply cache key. They now take the three as named parameters, and an unknown keyword is a TypeError. A per-call value replaces the configured one under the existing sampling gates. Claude gets no seed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PeiMDks7nktpAGiC1DrCfs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PeiMDks7nktpAGiC1DrCfs
dan-petty
force-pushed
the
claude/project-thread-994r5g
branch
from
November 1, 2026 23:07
5c52717 to
73e86a6
Compare
dan-petty
marked this pull request as ready for review
November 1, 2026 23:15
dan-petty-release Bot
added a commit
that referenced
this pull request
Nov 1, 2026
🤖 I have created a release *beep* *boop* --- ## [0.38.0](v0.37.4...v0.38.0) (2026-11-01) ### Features * **review:** osv-scanner toolrun records its database digest ([#3120](#3120)) ([5731fac](5731fac)) * **roadmap:** add gate tools to the runner, one shell policy ([#3111](#3111)) ([7735d8b](7735d8b)), closes [#3072](#3072) * **roadmap:** give the step AGENTS.md and routed rules ([#3107](#3107)) ([80a22eb](80a22eb)), closes [#3097](#3097) * **roadmap:** run the project hooks and scoped CI in the Job ([#3112](#3112)) ([b7ab211](b7ab211)), closes [#3043](#3043) ### Bug Fixes * **ai:** send the per-call sampling of LLMClient.chat ([#3126](#3126)) ([8207bdc](8207bdc)) * **argo:** replace a token that Argo CD refuses ([#3121](#3121)) ([b4955b4](b4955b4)) * **devcontainer:** remove CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC ([#3125](#3125)) ([295c32c](295c32c)) * **k8s:** set q8_0 KV cache on every Ollama tier ([#3101](#3101)) ([aad0115](aad0115)) * **rag:** raise EmbeddingsError for an empty Ollama URL list ([#3118](#3118)) ([111a031](111a031)) * **security:** refuse PYTEST_ADDOPTS and npm_config_logs_dir overrides ([#3119](#3119)) ([9fe2af5](9fe2af5)) ### Code Refactoring * **security:** read legacy numeric hosts with getaddrinfo ([#3128](#3128)) ([41779f9](41779f9)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.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.
Requested by D · project thread
LLMClient.chatandchat_messagestook**kwargsand used none of them. A caller that passedtemperature,top_porseed, such as review group analysis, got the configured sampling and no error.The two methods now take the three values as named parameters, so an unknown keyword is a
TypeError. OneCallSamplingvalue carries them to the OpenAI-compatible, Ollama and Claude drivers. A per-call value replaces the configured one. The sampling gates that exist (use_model_sampling, a reasoning model of the OpenAI-compatible driver, the Claude capabilities) also apply to a per-call value. Claude gets no seed, because the Messages API has none. The reply cache key holds the per-call values, so calls with different sampling do not share a reply. Theuse_model_samplingdescription now names the seed.Closes #2559
Change:
openspec/changes/archive/2026-11-01-2559-llmclient-chat-takes-temperature-top-p/Generated by Claude Code