Minor Changes
- #11400
0e7c765Thanks @thushanth-bengre-langchain! - fix(google-genai): throw a typed, catchableEmptyContentErrorinstead of silently returning empty content / an emptygenerationsarray when a non-streaming call (.invoke(),.generate(),.batch()) gets back a Gemini candidate with no content — whether from an explicit block (safety/recitation filter, rejected prompt) or the model just not producing usable output (a malformed function call, a thinking model exhausting its token budget). The streaming path (.stream()) is unaffected by this behavior change; it now safely skips a contentless chunk instead of throwing a rawTypeError.
Patch Changes
- #11405
8cfff4dThanks @hntrl! - Add LangSmith gateway support for Google Gemini (Developer API) models. WhenLANGSMITH_GATEWAYis set,ChatGoogleGenerativeAIandChatGoogle(andinitChatModel("google-genai:...")) route requests through the gateway's Gemini path, using the gateway key (falling back toLANGSMITH_API_KEY). An explicitbaseUrl/endpoint, an explicitapiKey, or a Vertex AI configuration suppress gateway routing. Also addsGEMINI_API_KEYas a fallback env var forChatGoogleGenerativeAI.