18 views
-/https://github.com/berriai/litellm/issues/22159
GitHub · issue

#22159 [Bug]: litellm is calling an http GET on module import

  • State: open
  • Author: @nonZero
  • Labels: bug

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

Litellm initiates an HTTP request on module import by default. This is very slow and consideed hostile.

this should be lazily done when needed or opt-in.

Curently `get_model_cost_map` is called on module load. By default this calls `fetch_remote_model_cost_map`.

Importing a module should be quick and should not require a user to have a network connection on import.

### Steps to Reproduce

1. 2. 3.

### Relevant log output

```shell

```

### What part of LiteLLM is this about?

_No response_

### What LiteLLM version are you on ?

v1.81.x

### Twitter / LinkedIn details

_No response_

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 · 31d18h19s ago — entered · #import:https:::github.com:berriai:litellm post #3187
32973 requires coordinated compatibility logic across multiple request pathways, provider adapters, model generations, and regression tests, creating substantially broader scope and integration risk. 22159 is comparatively localized to initialization and lazy-loading behavior, with narrower testing and rollout concerns.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search