Skip to content

chat: accept null stream and use greedy decoding at zero temperature - #192

Merged
SearchSavior merged 1 commit into
SearchSavior:mainfrom
adas0x:fix/185-stream-null-temperature
Oct 6, 2026
Merged

SearchSavior merged 1 commit into
SearchSavior:mainfrom
adas0x:fix/185-stream-null-temperature

Conversation

@adas0x

@adas0x adas0x commented Oct 6, 2026 •

Copy link
Copy Markdown

The repro suggested clamping to temperature = 1.0 + do_sample = False. I kept the do_sample = False (that's the bit that actually stops OpenVINO's temperature > 0 assert) but left the temperature at 0, because on an OpenAI-compatible endpoint temperature: 0 is a perfectly valid request that just means "greedy" IIRC. and quietly rewriting the caller's value to 1 felt wrong, and it isn't needed once sampling is off.

Verified on an Arc A770 with a small model: omit stream, stream: null, and temperature: 0 all come back 200, and the model no longer gets unloaded on the temp-0 path. Pulled the temperature logic into a shared apply_temperature helper so llm and vlm don't drift.

Closes #185.

Closes SearchSavior#185.

temperature 0 maps to do_sample=False rather than rewriting the temperature, so
the client's value is preserved on an OpenAI-compatible endpoint.
@adas0x
adas0x marked this pull request as ready for review October 6, 2026 13:27
@SearchSavior
SearchSavior merged commit f3b0937 into SearchSavior:main Oct 6, 2026
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.

stream field requires bool type : requests from clients sending null are rejected

2 participants