BerriAI/litellm · error · ValueError
Palm was decommisioned on October 2024. Please use the `gemi
Error message
Palm was decommisioned on October 2024. Please use the `gemini/` route for Gemini Google AI Studio Models. Announcement: https://ai.google.dev/palm_docs/palm?hl=en
What it means
ValueError raised by the completion router when custom_llm_provider == 'palm': Google PaLM was decommissioned in October 2024, and litellm keeps the branch only to fail fast with a pointer to the replacement route. The PaLM API no longer exists server-side, so retrying against it can never work.
Source
Thrown at litellm/main.py:5698
elif custom_llm_provider == "databricks":
response = _complete_databricks(_dispatch_ctx)
elif custom_llm_provider == "datarobot":
response = _complete_datarobot(_dispatch_ctx)
elif custom_llm_provider == "openrouter":
response = _complete_openrouter(_dispatch_ctx)
elif custom_llm_provider == "vercel_ai_gateway":
response = _complete_vercel_ai_gateway(_dispatch_ctx)
elif (
custom_llm_provider == "together_ai"
or ("togethercomputer" in model)
or (model in litellm.together_ai_models)
):
"""
Deprecated. We now do together ai calls via the openai client - https://docs.together.ai/docs/openai-api-compatibility
"""
elif custom_llm_provider == "palm":
raise ValueError(
"Palm was decommisioned on October 2024. Please use the `gemini/` route for Gemini Google AI Studio Models. Announcement: https://ai.google.dev/palm_docs/palm?hl=en"
)
elif custom_llm_provider == "vertex_ai_beta" or custom_llm_provider == "gemini":
response = _complete_vertex_ai_beta(_dispatch_ctx)
elif custom_llm_provider == "vertex_ai":
response = _complete_vertex_ai(_dispatch_ctx)
elif custom_llm_provider == "predibase":
response = _complete_predibase(_dispatch_ctx)
elif custom_llm_provider == "text-completion-codestral":
response = _complete_text_completion_codestral(_dispatch_ctx)
elif custom_llm_provider == "text-completion-inception":
response = _complete_text_completion_inception(_dispatch_ctx)
elif custom_llm_provider in ("sagemaker_chat", "sagemaker_nova"):
# boto3 reads keys from .env
# sagemaker_chat: HF Messages API endpoints
# sagemaker_nova: Nova models on SageMaker (OpenAI-compatible)
response = _complete_sagemaker_chat(_dispatch_ctx)View on GitHub (pinned to 77b7c6c40c)
Solutions
- Switch the model string to the Gemini route: model='gemini/gemini-1.5-flash' (or a current Gemini model)
- Set GEMINI_API_KEY (Google AI Studio key) for the gemini/ provider
- Sweep configs/env/DB for 'palm' strings so nothing resurrects the old route
- If you need Vertex, use 'vertex_ai/' prefixed Gemini models with GCP auth instead
Example fix
# before resp = litellm.completion(model='palm/chat-bison', messages=m) # ValueError: decommissioned # after import os os.environ['GEMINI_API_KEY'] = 'AIza...' resp = litellm.completion(model='gemini/gemini-1.5-flash', messages=m)
Defensive patterns
Strategy: validation
Validate before calling
if model.startswith('palm/'):
model = 'gemini/' + model.split('/', 1)[1] # migrate legacy PaLM names
os.environ.setdefault('GEMINI_API_KEY', key) Type guard
def is_deprecated_palm(model: str) -> bool:
return model.startswith('palm/') or model == 'palm' Try / catch
try:
resp = litellm.completion(model=model, messages=m)
except ValueError as e:
if 'decommisioned' in str(e):
raise RuntimeError('PaLM is gone; use gemini/<model> with GEMINI_API_KEY') from e
raise Prevention
- Grep configs, env files, and DB-stored model names for 'palm' and migrate them to gemini/ routes
- Keep GEMINI_API_KEY configured wherever PaLM keys used to live
- Add a startup lint that rejects any model prefix from a known-dead provider list
- Track provider deprecations in litellm release notes when upgrading major versions
When it happens
Trigger: Legacy code or configs still using model='palm/...' / custom_llm_provider='palm' -- old tutorials, stale environment presets, or upgraded litellm in a project that never migrated off PaLM.
Common situations: Maintaining an old codebase after a litellm upgrade; docs/samples predating the shutdown; a model name pulled from an old database/config table that still stores 'palm/...'.
Related errors
- You must be a LiteLLM Enterprise user to use this feature. I
- custom_ui_sso_sign_in_handler is not configured. Please set
- 🚨🚨🚨 DISABLING LLM API ENDPOINTS is an Enterprise feature
- 🚨🚨🚨 DISABLING ADMIN ENDPOINTS is an Enterprise feature 🚨
- Invalid mode: {custom_auth_settings['mode']}
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/ef616c578044571f.
Report an issue: GitHub.