{"record":{"id":"ef616c578044571f","repo":"BerriAI/litellm","slug":"palm-was-decommisioned-on-october-2024-please-use","errorCode":null,"errorMessage":"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","messagePattern":"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","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/main.py","lineNumber":5698,"sourceCode":"        elif custom_llm_provider == \"databricks\":\n            response = _complete_databricks(_dispatch_ctx)\n\n        elif custom_llm_provider == \"datarobot\":\n            response = _complete_datarobot(_dispatch_ctx)\n        elif custom_llm_provider == \"openrouter\":\n            response = _complete_openrouter(_dispatch_ctx)\n        elif custom_llm_provider == \"vercel_ai_gateway\":\n            response = _complete_vercel_ai_gateway(_dispatch_ctx)\n        elif (\n            custom_llm_provider == \"together_ai\"\n            or (\"togethercomputer\" in model)\n            or (model in litellm.together_ai_models)\n        ):\n            \"\"\"\n            Deprecated. We now do together ai calls via the openai client - https://docs.together.ai/docs/openai-api-compatibility\n            \"\"\"\n        elif custom_llm_provider == \"palm\":\n            raise ValueError(\n                \"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\"\n            )\n        elif custom_llm_provider == \"vertex_ai_beta\" or custom_llm_provider == \"gemini\":\n            response = _complete_vertex_ai_beta(_dispatch_ctx)\n\n        elif custom_llm_provider == \"vertex_ai\":\n            response = _complete_vertex_ai(_dispatch_ctx)\n        elif custom_llm_provider == \"predibase\":\n            response = _complete_predibase(_dispatch_ctx)\n        elif custom_llm_provider == \"text-completion-codestral\":\n            response = _complete_text_completion_codestral(_dispatch_ctx)\n        elif custom_llm_provider == \"text-completion-inception\":\n            response = _complete_text_completion_inception(_dispatch_ctx)\n        elif custom_llm_provider in (\"sagemaker_chat\", \"sagemaker_nova\"):\n            # boto3 reads keys from .env\n            # sagemaker_chat: HF Messages API endpoints\n            # sagemaker_nova: Nova models on SageMaker (OpenAI-compatible)\n            response = _complete_sagemaker_chat(_dispatch_ctx)","sourceCodeStart":5680,"sourceCodeEnd":5716,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/main.py#L5680-L5716","documentation":"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.","triggerScenarios":"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.","commonSituations":"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/...'.","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"],"exampleFix":"# before\nresp = litellm.completion(model='palm/chat-bison', messages=m)  # ValueError: decommissioned\n\n# after\nimport os\nos.environ['GEMINI_API_KEY'] = 'AIza...'\nresp = litellm.completion(model='gemini/gemini-1.5-flash', messages=m)","handlingStrategy":"validation","validationCode":"if model.startswith('palm/'):\n    model = 'gemini/' + model.split('/', 1)[1]  # migrate legacy PaLM names\n    os.environ.setdefault('GEMINI_API_KEY', key)","typeGuard":"def is_deprecated_palm(model: str) -> bool:\n    return model.startswith('palm/') or model == 'palm'","tryCatchPattern":"try:\n    resp = litellm.completion(model=model, messages=m)\nexcept ValueError as e:\n    if 'decommisioned' in str(e):\n        raise RuntimeError('PaLM is gone; use gemini/<model> with GEMINI_API_KEY') from e\n    raise","preventionTips":["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"],"tags":["palm","gemini","deprecation","provider-migration","litellm"],"backgroundTag":"deprecated-provider","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}