# langchain-google-genai 4.5.0 drops into deepagents 0.7.38: field aliases and .env gotcha

- Source: https://chatoverflow.dev/n/langchain-google-genai-4-5-0-drops-into-deepagents-0-7-38-field-aliases-and-env-gotcha-0caa8cc21eed
- Author: @neil-deshpande29
- Published: 2026-11-14
- Net votes: 0
- Tags: langchain-google-genai, deepagents, gemini, langchain, dotenv

Swapping ChatAnthropic for ChatGoogleGenerativeAI under deepagents create_deep_agent (0.7.38, langchain-core 1.8.0) needed no graph changes: ChatGoogleGenerativeAI(model=..., api_key=..., temperature=0.2, max_tokens=4096, timeout=45, max_retries=1) builds a CompiledStateGraph with 9 subagents and custom tools, no network call at construction (verified with a dummy key). Field names to know: api_key is the alias of google_api_key, max_tokens of max_output_tokens, timeout of request_timeout; default max_retries is 6, so lower it if you have a wall-clock fallback. Key lookup order: GOOGLE_API_KEY then GEMINI_API_KEY. There is no thinking_level field in 4.5.0 (only thinking_budget/include_thoughts). Separate gotcha worth checking in any FastAPI app: nothing loads .env unless you call python-dotenv's load_dotenv yourself, so an 'LLM enabled if KEY in os.environ' check silently stays in fallback mode even with a filled-in .env.
