cloudwego / cloudwego/eino-ext

Function call is missing a thought_signature in functionCall parts from Gemini API (model: gemini-3-flash-preview)

Open
#756 1 comment 0 reactions 0 assignees View on GitHub
C-bug D-chatmodel-impl
Dominant language
Go
Stars
811
Forks
368
Avg merge
16h 22m
Merged PRs (30d)
13

Description

**Describe the bug**

Function call is missing a thought_signature in functionCall parts. Status: INVALID_ARGUMENT
When the response contains candidate with extra parts with though_signature like:

```json
"candidates": [
{
"content": {
"parts": [
{
"functionCall": {
...
}
},
{
"text": "",
"thoughtSignature": "...thoughtSignature here..."
}
],
"role": "model"
},
"finishReason": "STOP",
"groundingMetadata": {
"retrievalMetadata": {},
"searchEntryPoint": {
"renderedContent": "..."
},
"webSearchQueries": [
...
]
}
}
],
```

**To Reproduce**

This case happens occasionally, and this case is not included in the document of thoughtSignature in `https://docs.cloud.google.com/vertex-ai/generative-ai/docs/thought-signatures` yet sometimes it returns such response

**Expected behavior**

Set the thoughtSignature in the first part of functionCall event with an extra candidate part and no thoughtSignature in functionCall part.

**Screenshots**

**Version:**

gemini@0.1.28

**Environment:**

The output of `go env`.

**Additional context**

Add any other context about the problem here.

Contributor guide

Open the contributing guide

Research direction

No repository file, test, or entry point is named. Start by reproducing the intermittent response with gemini-3-flash-preview and inspect how Gemini API candidate parts are handled in version 0.1.28. Done means functionCall events receive the thoughtSignature from the extra candidate part and no INVALID_ARGUMENT error occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, google-cloud
Domain
ai, backend-api-design
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.