fix(gemini): trailing empty text part with thoughtSignature#757
fix(gemini): trailing empty text part with thoughtSignature#757o0O96O0o wants to merge 6 commits into
Conversation
|
hehuaisen seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
@o0O96O0o hello, please sign the CLA. |
|
@o0O96O0o The fix direction makes sense and it covers the reported Gemini response shape. My only concern is that the fallback is currently too broad: it moves a thoughtSignature from any non-functionCall part after a functionCall, not only from the trailing empty text/signature-only part described in the issue. Could we restrict the fallback to that exact empty-part case and add a negative test where a real non-empty output part with thoughtSignature should keep its signature instead of copying it to the tool call? |
…(gemini)/trailing-thoughtSignature
…b.com/o0O96O0o/eino-ext into fix(gemini)/trailing-thoughtSignature
What type of PR is this?
fix: there is trailing empty text candidate part with thoughtSignature instead of placing the signature in the first part of functionCall (as described in the document
https://docs.cloud.google.com/vertex-ai/generative-ai/docs/thought-signatures)Check the PR title.
(Optional) Translate the PR title into Chinese.
(Optional) More detailed description for this PR(en: English/zh: Chinese).
en:
fix: there is trailing empty text candidate part with thoughtSignature instead of placing the signature in the first part of functionCall (as described in the document
https://docs.cloud.google.com/vertex-ai/generative-ai/docs/thought-signatures) like:added fallback handle to move the thoughtSignature in the empty part to the first tool_call part
zh(optional):
(Optional) Which issue(s) this PR fixes:
fixed: #756
(optional) The PR that updates user documentation: