Repository navigation
fix(delegate): omit temperature when the model's compat.supportsTemperature is false - #31
Open
skylerwshaw wants to merge 1 commit into
Open
skylerwshaw wants to merge 1 commit into
skylerwshaw wants to merge 1 commit into
Conversation
…rature is false callVisionModel always sent temperature: 0. Models that reject an explicit temperature, such as Claude Haiku 5.5 (via LiteLLM: "does not support temperature=0. Only temperature=1 is supported"), failed every describe_image call with a 400. pi-ai already records this as compat.supportsTemperature: false on those models and defaults it to true. Read the same flag here and leave temperature out when it is false; other models keep temperature: 0.
skylerwshaw
marked this pull request as ready for review
October 21, 2026 22:10
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.
Fixes #30
callVisionModelalways senttemperature: 0, so models that reject an explicit temperature (for example Claude Haiku 5.5) failed everydescribe_imagecall with a 400.pi-ai already marks those models
compat.supportsTemperature: falseand defaults the flag totrue. This reads the same flag and omitstemperaturewhen it isfalse. Every other model still getstemperature: 0.Testing
callVisionModel: omits temperature when model.compat.supportsTemperature is false. It fails without the change.pnpm typecheckclean,pnpm test:run355/355.Note on open PRs
#27 rewrites the delegate to dispatch on
model.apiand dropstemperaturefor its Anthropic and Responses branches, but its chat-completions and Gemini branches still hardcodetemperature: 0. This change is small and should rebase onto #27 easily if that one lands first.