Repository navigation
Client AI: do not send temperature unless explicitly configured - #108014
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) <[email protected]>
|
Workflow [PR], commit [ca91c12] Summary: ✅
AI ReviewSummaryThis PR makes Final VerdictStatus: ✅ Approve |
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered by tests: 15/15 (100.00%) | Lost baseline coverage: none · Uncovered code |
|
@groeneai, fix the test for RabbitMQ and send a PR. |
|
@alexey-milovidov done in a separate PR: #108253.
|
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
…temperature Client AI: do not send `temperature` unless explicitly configured
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
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