{{ message }}
Client AI: do not send temperature unless explicitly configured#108014
Merged
Conversation
The AI SQL generation feature (`??` prompt) always sent a `temperature` parameter to the model, because `AIConfiguration::temperature` defaulted to `0.0` and was unconditionally copied into the request options. Some models reject the `temperature` parameter outright (for example, reasoning models served behind OpenAI-compatible gateways respond with `temperature is deprecated for this model`), which made AI SQL generation fail for those models regardless of configuration. Make `temperature` a `std::optional<double>` that is left unset by default and only sent to the model when the user explicitly configures `ai.temperature` in the client configuration. The request builder already omits the field when the option has no value, so no behavior changes for users who do set a temperature. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Contributor
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered by tests: 15/15 (100.00%) | Lost baseline coverage: none · Uncovered code |
Member
Author
|
@groeneai, fix the test for RabbitMQ and send a PR. |
Contributor
1 task
sdairs
approved these changes
Jun 24, 2026
ylw510
pushed a commit
to ylw510/ClickHouse
that referenced
this pull request
Jun 24, 2026
Direct SELECT from `RabbitMQ` consumes rows, so tests must accumulate returned batches. Reset the polling deadline whenever accumulated rows increase to avoid failing while sanitizer/db-disk runs are still making progress. CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=108014&sha=ca91c12b238e033b5dc8c7453295e4e7017ac997 Related PR: ClickHouse#108014
This was referenced Jun 30, 2026
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.

The AI SQL generation feature in
clickhouse-client/clickhouse-local(the??prompt) always sent atemperatureparameter to the model, becauseAIConfiguration::temperaturedefaulted to0.0and was unconditionally copied into the request options.Some models reject the
temperatureparameter outright — for example, reasoning models served behind OpenAI-compatible gateways respond withtemperature is deprecated for this model— which made AI SQL generation fail for those models regardless of configuration.This makes
temperatureastd::optional<double>that is left unset by default and only sent to the model when the user explicitly configuresai.temperature. The request builder already omits the field when the option has no value, so there is no behavior change for users who do set a temperature.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
AI SQL generation in the client no longer sends the
temperatureparameter unless it is explicitly set viaai.temperaturein the configuration. This fixes AI SQL generation for models that reject thetemperatureparameter.Documentation entry for user-facing changes