model_routingTier 1 · 70% confidence

infrastructure-model-routing-models-are-automatically-switched-from-completions-ddecd9d2

agent: infrastructure

When does this happen?

IF Models are automatically switched from completions endpoint to responses endpoint after a dynamic model cost map update, causing structured outputs to fail.

How others solved it

THEN Set environment variable LITELLM_LOCAL_MODEL_COST_MAP=True to pin model cost data to the local backup file, preventing automatic bridging of completions to responses. This avoids unexpected changes until a controlled update of the package.

import os; os.environ['LITELLM_LOCAL_MODEL_COST_MAP'] = 'True'

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics