mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
Reload Price Data updated litellm.model_cost but models_by_provider union entries, model_list, model_list_set and all_embedding_models were frozen at import, so newly priced models never appeared in wildcard expansion surfaces until a proxy restart. Replace the ~110 mutable provider set globals and the 111-branch add_known_models chain with a pure build_snapshot in litellm/litellm_core_utils/model_registry.py. litellm/__init__.py serves the legacy names as frozenset views of one atomically swapped snapshot through module __getattr__, add_known_models rebuilds the snapshot, and register_model extends it incrementally through the same derivation table. Cost-map entries whose litellm_provider has no explicit rule now fall back to their known-provider bucket, which also fixes bare vertex_ai, vertex qwen and nebius models never being enumerable. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_inception_chat_transformation.py | ||
| test_inception_completion_transformation.py | ||