BerriAI/litellm · error · PalmError
{str(e)}
Error message
{str(e)} What it means
Error "{str(e)}" thrown in BerriAI/litellm.
Source
Thrown at litellm/llms/deprecated_providers/palm.py:141
if "role" in message:
if message["role"] == "user":
prompt += f"{message['content']}"
else:
prompt += f"{message['content']}"
else:
prompt += f"{message['content']}"
## LOGGING
logging_obj.pre_call(
input=prompt,
api_key="",
additional_args={"complete_input_dict": {"inference_params": inference_params}},
)
## COMPLETION CALL
try:
response: Final = palm.generate_text(prompt=prompt, **inference_params)
except Exception as e:
raise PalmError(
message=str(e),
status_code=500,
)
## LOGGING
logging_obj.post_call(
input=prompt,
api_key="",
original_response=response,
additional_args={"complete_input_dict": {}},
)
print_verbose(f"raw model_response: {response}")
## RESPONSE OBJECT
completion_response = response
try:
choices_list: Final = []
for idx, item in enumerate(completion_response.candidates):
if len(item["output"]) > 0:View on GitHub (pinned to 6c2dcb801b)
Solutions
- Inspect the wrapped exception from the PaLM call.
When it happens
Trigger: Thrown at litellm/llms/deprecated_providers/palm.py:141 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/761eeb68b558f96b.
Report an issue: GitHub.