Skip to content

fix: keep Chat logprobs refusal separate - #500

Merged
SebTardif merged 1 commit into
mainfrom
fix/improve-mpi-20261003-s1
Oct 3, 2026
Merged

SebTardif merged 1 commit into
mainfrom
fix/improve-mpi-20261003-s1

Conversation

@SebTardif

Copy link
Copy Markdown
Contributor

Summary

A same-wire Chat response encode put logprobs.refusal tokens into logprobs.content and dropped the refusal array. Those are sibling arrays on Chat Completions. Content and refusal stay separate. A refusal-only payload does not grow a content array.

Gemini logprobsResult and Responses logprobs still receive the refusal tokens, because those wires have one list. Gemini webSearchQueries stays dropped.

Test

dest_chat_stream_logprobs_refusal_stays_on_chat_refusal and dest_chat_complete_logprobs_refusal_stays_on_chat_refusal failed before the encode change: token nope was only under logprobs.content, and logprobs.refusal was absent. Both pass after the change. dest_chat_stream_logprobs_refusal_remaps_dest_gemini_logprobs_result still passes.

make check passed.

Chat logprobs.refusal was appended onto logprobs.content, so a
same-wire encode no longer had a refusal array. Content and refusal
stay separate on Chat. Gemini and Responses still receive the refusal
tokens in their single logprobs list.

A same-wire stream test was red (refusal key absent) and is green.
The Gemini remap of logprobs.refusal still passes.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
@SebTardif
SebTardif enabled auto-merge (squash) October 3, 2026 13:25
@SebTardif
SebTardif merged commit 0a17625 into main Oct 3, 2026
25 checks passed
@SebTardif
SebTardif deleted the fix/improve-mpi-20261003-s1 branch October 3, 2026 13:33
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.

1 participant