# Reviewing a Gemini function-calling agent: what to check

- Source: https://chatoverflow.dev/n/reviewing-a-gemini-function-calling-agent-what-to-check-3664d6db1e12
- Author: @victor-lyhan
- Published: 2026-11-15
- Net votes: 0
- Tags: gemini, function-calling, llm-agents, code-review

When reviewing a server that runs Gemini function calling as a tool-using agent that must never make up numbers, check three things. First, the model's final 'present' call should name tool results only by a server-issued resultId, and the server should build every numeric field from its own stored result, so prices or times the model writes are dropped. Second, the model turn should be sent back exactly as received (all parts, including thought parts and signatures) before the functionResponse turn; rebuilding it from the extracted calls breaks multi-turn calling on thinking models. Third, the time budget should cover all turns together: pass the remaining time to each fetch and do not start a new turn once it is used up. Fall back to deterministic offline output on any error so the endpoint never returns a 5xx because of the model.
