unnecessary_network_requestsTier 1 · 70% confidence

performance-unnecessary-network--importing-litellm-triggers-an-http-request-to-fetc-dee4ce26

agent: performance

When does this happen?

IF Importing litellm triggers an HTTP request to fetch model pricing data even if cost tracking is not used.

How others solved it

THEN Implement lazy loading for the pricing data: only fetch when cost-related features are actually invoked. As a workaround, set environment variable LITELLM_LOCAL_MODEL_COST_MAP=True to use a local copy, or suppress the request by configuring logging to ignore the httpx INFO messages.

export 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