BerriAI/litellm · error · Exception

Unable to health check wildcard model for provider

Error message

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

What it means

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.

Solutions

  1. Replace the wildcard with concrete model(s) in config.yaml so the health check probes a real deployment.
  2. Add explicit model_info entries (with mode: chat) for that provider in config.yaml.
  3. Upgrade litellm so a newer model_prices_and_context_window.json ships (new providers are added continuously).
  4. Contribute the missing provider's models to the upstream model_prices_and_context_window.json, as the message suggests.

Example fix

# before (config.yaml)
model_list:
  - model_name: custom/*
    litellm_params:
      model: custom/*
      api_base: https://llm.internal/v1

# after
model_list:
  - model_name: custom/llama-3
    litellm_params:
      model: openai/llama-3
      api_base: https://llm.internal/v1
Defensive patterns

Strategy: validation

Validate before calling

import litellm

provider = 'custom'
has_chat_models = any(
    m.get('litellm_provider') == provider and m.get('mode', 'chat') == 'chat'
    for m in litellm.model_cost.values()
)
if not has_chat_models:
    # replace wildcard with concrete models before running /health
    raise RuntimeError(f'no catalog chat models for {provider!r}; define concrete models in config.yaml')

Try / catch

import requests

resp = requests.get('http://localhost:4000/health')
if resp.status_code != 200:
    body = resp.json()
    if 'Unable to health check wildcard model' in str(body):
        # replace wildcard deployments with concrete model names, then re-run
        pass

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/fd1488fe3883a529. Report an issue: GitHub.

Appendix: source

Thrown at litellm/litellm_core_utils/health_check_helpers.py:33


class HealthCheckHelpers:
    @staticmethod
    async def ahealth_check_wildcard_models(
        model: str,
        custom_llm_provider: str,
        model_params: dict,
        litellm_logging_obj: "Logging",
    ) -> dict:
        from litellm import acompletion
        from litellm.litellm_core_utils.llm_request_utils import (
            pick_cheapest_chat_models_from_llm_provider,
        )

        # this is a wildcard model, we need to pick a random model from the provider
        cheapest_models = pick_cheapest_chat_models_from_llm_provider(custom_llm_provider=custom_llm_provider, n=3)
        if len(cheapest_models) == 0:
            raise Exception(
                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"
            )
        if len(cheapest_models) > 1:
            fallback_models = cheapest_models[1:]  # Pick the last 2 models from the shuffled list
        else:
            fallback_models = None
        model_params["model"] = cheapest_models[0]
        model_params["litellm_logging_obj"] = litellm_logging_obj
        model_params["fallbacks"] = fallback_models
        model_params["max_tokens"] = model_params.get("max_tokens", 16)  # GPT-5 models require max_output_tokens >= 16
        await acompletion(**model_params)
        return {}

    @staticmethod
    def _update_model_params_with_health_check_tracking_information(
        model_params: dict,
    ) -> dict:
        """

View on GitHub (pinned to 77b7c6c40c)