馃敶 Required Information
Describe the Bug:
LiteLLM embeds a Gemini thought_signature inside the tool call id, separated by __thought__ (see _THOUGHT_SIGNATURE_SEPARATOR). _message_to_generate_content_response already extracts that signature onto part.thought_signature, but then assigns the raw id to part.function_call.id:
thought_signature = _extract_thought_signature_from_tool_call(tool_call)
part = types.Part.from_function_call(...)
part.function_call.id = tool_call.id # still "call_abc__thought__AY89a18..."
if thought_signature:
part.thought_signature = thought_signature
So every consumer of function_call_id gets several hundred characters of base64 glued onto the real id:
call_abc__thought__AY89a18qpllj6mkpxPjhFEcbBbtEsqy4Ia4Eam2lD_NsoZ...
In practice it leaks into logs, into any UI that displays a tool call id, and into anything that derives a name from one.
Steps to Reproduce:
- Run an agent on
LiteLlm(model="vertex_ai/gemini-3.5-flash") (any Gemini model through LiteLLM) with a tool.
- Prompt it so the model both thinks and calls the tool.
- Inspect
part.function_call.id on the resulting event, or anything keyed by it.
Expected Behavior:
part.function_call.id is the id LiteLLM assigned, e.g. call_abc, with the signature available separately on part.thought_signature.
Observed Behavior:
part.function_call.id is call_abc__thought__AY89a18..., carrying a few hundred characters of base64 that every downstream consumer inherits.
Environment Details:
- ADK Library Version (pip show google-adk): 1.31.1, and current
main
- Desktop OS: macOS
- Python Version (python -V): 3.13.5
Model Information:
- Are you using LiteLLM: Yes
- Which model is being used:
vertex_ai/gemini-3.5-flash
馃敶 Required Information
Describe the Bug:
LiteLLM embeds a Gemini
thought_signatureinside the tool call id, separated by__thought__(see_THOUGHT_SIGNATURE_SEPARATOR)._message_to_generate_content_responsealready extracts that signature ontopart.thought_signature, but then assigns the raw id topart.function_call.id:So every consumer of
function_call_idgets several hundred characters of base64 glued onto the real id:In practice it leaks into logs, into any UI that displays a tool call id, and into anything that derives a name from one.
Steps to Reproduce:
LiteLlm(model="vertex_ai/gemini-3.5-flash")(any Gemini model through LiteLLM) with a tool.part.function_call.idon the resulting event, or anything keyed by it.Expected Behavior:
part.function_call.idis the id LiteLLM assigned, e.g.call_abc, with the signature available separately onpart.thought_signature.Observed Behavior:
part.function_call.idiscall_abc__thought__AY89a18..., carrying a few hundred characters of base64 that every downstream consumer inherits.Environment Details:
mainModel Information:
vertex_ai/gemini-3.5-flash