-
Notifications
You must be signed in to change notification settings - Fork 610
Description
Describe the bug
Gemini 3 Pro (gemini-3-pro-preview) employs dynamic thinking by default, which cannot be disabled. Consequently, the model API returns response parts containing the thoughtSignature property to represent this thinking process.
However, the current fromGeminiPart implementation in @genkit-ai/googleai and @genkit-ai/vertexai does not strictly account for parts that contain thoughtSignature without the thought property. This leads to a crash when consuming responses from Gemini 3 Pro.
Error Message
Error: Unsupported GeminiPart type: {"thoughtSignature":"..."}
at fromGeminiPart (gemini.ts:1026:9)
...
To Reproduce
- Initialize Genkit with @genkit-ai/vertexai or @genkit-ai/googleai.
- Generate content using the gemini-3-pro-preview model.
import { genkit } from 'genkit';
import { vertexAI } from '@genkit-ai/vertexai';
const ai = genkit({
plugins: [vertexAI()],
});
await ai.generate({
model: 'vertexai/gemini-3-pro-preview',
prompt: "How does AI work?",
config: {
thinkingConfig: {
thinkingLevel: "low",
}
},
});
Expected behavior
The plugin should recognize the thoughtSignature property in GeminiPart and map it correctly using the existing fromThought (or fromGeminiThought) handler, ensuring the model response is processed without error.
Runtime (please complete the following information):
- OS: MacOS
- Node version: v22.17.0
** Node version
- v22.17.0
Additional context
Per official documentation, Gemini 3 Pro uses thinking by default. The SDK needs to support the thoughtSignature part type which accompanies this behavior.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status