{"record":{"id":"fd1488fe3883a529","repo":"BerriAI/litellm","slug":"unable-to-health-check-wildcard-model-for-provider","errorCode":null,"errorMessage":"Unable to health check wildcard model for provider {custom_llm_provider}. Add a model on your config.yaml or contribute here - https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json","messagePattern":"Unable to health check wildcard model for provider (.+?)\\. Add a model on your config\\.yaml or contribute here - https://github\\.com/BerriAI/litellm/blob/main/model_prices_and_context_window\\.json","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"litellm/litellm_core_utils/health_check_helpers.py","lineNumber":33,"sourceCode":"\n\nclass HealthCheckHelpers:\n    @staticmethod\n    async def ahealth_check_wildcard_models(\n        model: str,\n        custom_llm_provider: str,\n        model_params: dict,\n        litellm_logging_obj: \"Logging\",\n    ) -> dict:\n        from litellm import acompletion\n        from litellm.litellm_core_utils.llm_request_utils import (\n            pick_cheapest_chat_models_from_llm_provider,\n        )\n\n        # this is a wildcard model, we need to pick a random model from the provider\n        cheapest_models = pick_cheapest_chat_models_from_llm_provider(custom_llm_provider=custom_llm_provider, n=3)\n        if len(cheapest_models) == 0:\n            raise Exception(\n                f\"Unable to health check wildcard model for provider {custom_llm_provider}. Add a model on your config.yaml or contribute here - https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json\"\n            )\n        if len(cheapest_models) > 1:\n            fallback_models = cheapest_models[1:]  # Pick the last 2 models from the shuffled list\n        else:\n            fallback_models = None\n        model_params[\"model\"] = cheapest_models[0]\n        model_params[\"litellm_logging_obj\"] = litellm_logging_obj\n        model_params[\"fallbacks\"] = fallback_models\n        model_params[\"max_tokens\"] = model_params.get(\"max_tokens\", 16)  # GPT-5 models require max_output_tokens >= 16\n        await acompletion(**model_params)\n        return {}\n\n    @staticmethod\n    def _update_model_params_with_health_check_tracking_information(\n        model_params: dict,\n    ) -> dict:\n        \"\"\"","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/litellm_core_utils/health_check_helpers.py#L15-L51","documentation":"Raised by the wildcard health-check helper when a deployment's model is a wildcard for a provider (e.g. 'openai/*') and pick_cheapest_chat_models_from_llm_provider() finds zero chat models for that provider in model_prices_and_context_window.json. LiteLLM health-checks wildcards by substituting a cheap known chat model; with no candidates it cannot build a probe call and raises this Exception, failing the /health request for that deployment.","triggerScenarios":"LiteLLM proxy config.yaml with a wildcard deployment (litellm_params.model: 'someprovider/*') and a call to /health (or any health-check flow), where 'someprovider' has no chat entries in model_prices_and_context_window.json — brand-new, niche, self-hosted, or misspelled provider names.","commonSituations":"Adding a custom OpenAI-compatible provider behind a wildcard; provider slug typo so nothing matches the pricing catalog; very new providers whose entries are missing in the installed litellm version; health checks after upgrading the proxy but not the pricing data.","solutions":["Replace the wildcard with concrete model(s) in config.yaml so the health check probes a real deployment.","Add explicit model_info entries (with mode: chat) for that provider in config.yaml.","Upgrade litellm so a newer model_prices_and_context_window.json ships (new providers are added continuously).","Contribute the missing provider's models to the upstream model_prices_and_context_window.json, as the message suggests."],"exampleFix":"# before (config.yaml)\nmodel_list:\n  - model_name: custom/*\n    litellm_params:\n      model: custom/*\n      api_base: https://llm.internal/v1\n\n# after\nmodel_list:\n  - model_name: custom/llama-3\n    litellm_params:\n      model: openai/llama-3\n      api_base: https://llm.internal/v1","handlingStrategy":"validation","validationCode":"import litellm\n\nprovider = 'custom'\nhas_chat_models = any(\n    m.get('litellm_provider') == provider and m.get('mode', 'chat') == 'chat'\n    for m in litellm.model_cost.values()\n)\nif not has_chat_models:\n    # replace wildcard with concrete models before running /health\n    raise RuntimeError(f'no catalog chat models for {provider!r}; define concrete models in config.yaml')","typeGuard":null,"tryCatchPattern":"import requests\n\nresp = requests.get('http://localhost:4000/health')\nif resp.status_code != 200:\n    body = resp.json()\n    if 'Unable to health check wildcard model' in str(body):\n        # replace wildcard deployments with concrete model names, then re-run\n        pass","preventionTips":["Avoid wildcard models ('provider/*') in production config; pin concrete model names.","After adding a new provider, run /health once in staging to catch catalog gaps.","Keep litellm updated so model_prices_and_context_window.json includes new providers."],"tags":["litellm","proxy","health-check","wildcard-model","model-catalog"],"backgroundTag":"unknown-model-provider","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}