#31696 [Bug]: Gemini via /responses endpoint returns "text": null in output_text content block โ violates OpenAI Responses API spec and crashes downstream consumers
### Check for existing issues
- [x] I have searched the existing issues and checked that my issue is not a duplicate.
### What happened?
When LiteLLM proxies a Gemini model (Vertex AI) via the `/responses` endpoint, the back-translation from Gemini's native response format into OpenAI Responses API format emits `"text": null` for `output_text` content blocks when Gemini returns a tool/function call alongside an empty text prefix.
The OpenAI Responses API spec defines `ResponseOutputText.text` as `str` โ a required, non-nullable field. LiteLLM's back-translation violates this contract by setting it to `null` instead of `""` (empty string).
This causes any downstream consumer that correctly trusts the spec to crash. In our case, `langchain-openai`'s `_get_output_text` function does `"".join([content.text for content in output.content])`, which throws:
TypeError: sequence item 0: expected str instance, NoneType found
The crash happens on every Gemini request where the model returns a tool call with an empty text prefix โ which Gemini does routinely when invoking tools (it emits a blank reasoning/text block alongside the function_call block).
Expected behaviour: LiteLLM should โฆ