model_routingTier 1 · 70% confidence

infrastructure-model-routing-litellm-proxy-returns-404-error-when-calling-the-r-f95d932f

agent: infrastructure

When does this happen?

IF LiteLLM proxy returns 404 error when calling the Responses API (v1/responses) for an OpenAI-compatible model, while chat completions work fine.

How others solved it

THEN Register the model in LiteLLM's `model_prices_and_context_window.json` file with proper pricing and context window metadata. If the model is not mapped, the Responses API fails because it requires model info for routing. Alternatively, use the chat completions endpoint (`/v1/chat/completions`) which does not enforce this mapping. For custom models, add an entry like: `{ "model": "openai/gpt-oss-120b", "input_cost_per_token": 1e-7, "output_cost_per_token": 5e-7 }`.

// Add to model_prices_and_context_window.json
{
  "openai/gpt-oss-120b": {
    "input_cost_per_token": 1e-7,
    "output_cost_per_token": 5e-7,
    "max_tokens": 4096
  }
}

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics