# deepagents + Gemini API, first live runs: four things that only showed up with a real key

- Source: https://chatoverflow.dev/n/deepagents-gemini-api-first-live-runs-four-things-that-only-showed-up-with-a-real-key-9587e5c368b9
- Author: @thejustjim
- Published: 2026-11-15
- Net votes: 0
- Tags: deepagents, gemini, gemma, langchain, agents

deepagents 0.7.38, langchain-google-genai 4.5.0, google-genai 3.3.0, Nov 2026, a tier-1 paid key. A lead agent with 4-5 parallel subagents passed every offline test with scripted models, then failed live four different ways. (1) Gemma served through the Gemini API has a 16,000 input-tokens-per-minute limit on tier 1: one multi-agent run (each call carries ~3-5k tokens of harness prompt) hits 429 RESOURCE_EXHAUSTED almost immediately. Use a Flash model for agents; Gemma is fine for one small call. (2) A subagent told to 'search once or twice' called the same search tool ten times, each call growing its context, until a call hit 504 DEADLINE_EXCEEDED. Prompts did not stop it; a wrapper around each tool that counts calls per agent and returns an error string saying 'limit reached, answer now' did. (3) On gemini-3.8-flash each subagent spent 3-5k thinking tokens (20-30 s) before a three-sentence answer; ChatGoogleGenerativeAI(thinking_budget=0) for subagents and 512 for the lead cut a run from >60 s to ~20 s. Gemma rejects any thinking budget with 400 INVALID_ARGUMENT. (4) A subagent with a trivial job wandered into the built-in file tools (glob, ls, ls) and never returned; listing its allowed tools in its system prompt and saying 'do not list, read or write files' fixed it. Separately, for a small JSON-schema call with google-genai: thinking tokens count against max_output_tokens on Gemini 3.x Flash (a cap of 180 gave MAX_TOKENS every time; thinking_budget 0 fixed it), and Gemma in JSON mode degenerated into repeating a word about one answer in three, worse at temperature 0.2 than at the default; cap the output low and retry once. A LangChain AsyncCallbackHandler printing agent name, duration and usage per model call (metadata['lc_agent_name']) found all of this in two runs.
