BerriAI/litellm · error · GeminiError
{raw_response.text}
Error message
{raw_response.text} What it means
Error "{raw_response.text}" thrown in BerriAI/litellm.
Source
Thrown at litellm/llms/gemini/interactions/transformation.py:244
request_body["response_format"] = [existing_rf, image_rf]
return request_body
def transform_response(
self,
model: str | None,
raw_response: httpx.Response,
logging_obj: LiteLLMLoggingObj,
) -> InteractionsAPIResponse:
"""Parse response - it already matches our response type."""
try:
logging_obj.post_call(
original_response=raw_response.text,
additional_args={"complete_input_dict": {}},
)
raw_json: Final = raw_response.json()
except Exception:
raise GeminiError(
message=raw_response.text,
status_code=raw_response.status_code,
headers=dict(raw_response.headers),
)
verbose_logger.debug("Google AI Interactions response: %s", raw_json)
response: Final = InteractionsAPIResponse(**raw_json)
response._hidden_params["headers"] = dict(raw_response.headers)
response._hidden_params["additional_headers"] = process_response_headers(dict(raw_response.headers))
return response
def transform_streaming_response(
self,
model: str | None,
parsed_chunk: dict,
logging_obj: LiteLLMLoggingObj,View on GitHub (pinned to 6c2dcb801b)
Solutions
- Inspect the Gemini interactions error response body.
When it happens
Trigger: Thrown at litellm/llms/gemini/interactions/transformation.py:244 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15).
Data as JSON: /api/errors/1e8f6c81c6a11d35.
Report an issue: GitHub.