fix(coderd/x/chatd): retry quickgen without temperature when model rejects it - #27120
Merged
Merged
Conversation
ibetitsmike
approved these changes
Jul 10, 2026
ThomasK33
force-pushed
the
thomask33/codagt-780-quickgen-temperature
branch
from
July 10, 2026 06:55
a990fd3 to
9b98b13
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Status label and title generation fail in deployments where the configured model rejects the
temperatureparameter, for example fable-like model aliases served through AI Bridge:Problem
#26982 pinned
temperature: 0on quickgen calls (chat titles and turn status labels) for repeatable output. Fantasy providers striptemperatureonly for model names they recognize (OpenAI reasoning models, Anthropic thinking models). Gateway model aliases are not in any catalog, so the parameter is sent anyway and the provider rejects the request with a non-retryable 400.Fix
Quickgen generation now goes through a shared helper that keeps the pinned temperature, and when a provider returns a bad request mentioning
temperature, retries the call without the parameter and keeps it dropped for subsequent retry attempts. Detection is model-name agnostic, so it also covers OpenAI-style "Unsupported parameter" rejections for unrecognized aliases.Fixes CODAGT-780
Decision log
Considered alternatives:
temperatureentirely: regresses the repeatability intent of feat(coderd/x/chatd): improve title generation repeatability and quality #26982 for the majority of models that accept it.temperatureon rejection (chosen): keeps determinism where supported, degrades gracefully everywhere else. Since quickgen only ever sends a valid value (0), any 400 mentioningtemperaturereliably means the model rejects the parameter itself.Scope note:
chatloopalso forwardsTemperature, but only from admin-configured per-model options; silently dropping an explicit admin setting would hide misconfiguration, so it is left untouched.🤖 This PR was generated by Coder Agents on behalf of @ThomasK33 from Linear issue CODAGT-780.