Skip to content

docs(openspec): plan #2559 pass per-call sampling to LLM payload - #2997

Merged
dan-petty merged 1 commit into
mainfrom
fix/2559-llmclient-chat-takes-temperature-top-p
Nov 1, 2026
Merged

dan-petty merged 1 commit into
mainfrom
fix/2559-llmclient-chat-takes-temperature-top-p

Conversation

@devops-cli-service

Copy link
Copy Markdown
Contributor

Plans #2559

LLMClient.chat and chat_messages accept **kwargs but ignore temperature, top_p, and seed. The review analysis module passes these values and expects them to reach the model, but the request carries the client config defaults instead. This change replaces **kwargs with explicit temperature, top_p, and seed parameters. It threads them through the dispatch chain to the provider payload builders and the cache key. A per-call value overrides the config value when not None. The Claude provider omits seed, as the Anthropic API does not accept it. An unknown keyword argument now raises TypeError. Files changed: src/devops_cli/ai/client/unified.py, src/devops_cli/ai/client/openai.py, src/devops_cli/ai/client/ollama.py, src/devops_cli/ai/client/claude.py, and their tests.

Change: openspec/changes/2559-llmclient-chat-takes-temperature-top-p/

@dan-petty
dan-petty marked this pull request as ready for review November 1, 2026 10:23
@dan-petty
dan-petty self-requested a review as a code owner November 1, 2026 10:23
@dan-petty
dan-petty merged commit cba71f9 into main Nov 1, 2026
18 checks passed
@dan-petty
dan-petty deleted the fix/2559-llmclient-chat-takes-temperature-top-p branch November 1, 2026 10:23
dan-petty added a commit that referenced this pull request Nov 1, 2026
This change corrects the plan for #2559 in place.

An evaluation of the staging pull request #2997 found defects in the
plan. The corrected plan does these things:
- It orders the task groups by provider, so each group ends with a
passing test suite.
- It makes the cache key hash a per-call sampling value unless
`use_model_sampling` is on. The old rule left a stale cache hit for
Ollama and Claude with `supports_reasoning`.
- It makes the seed rule read the same in the proposal, the design, the
tasks and the spec.
- It states the sampling gates in the spec, with scenarios for a
reasoning model and for a Claude model without sampling support.

The change touches only the change folder of #2559. It changes no code
and no test.

Plans #2559
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant