mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
`ProxyConfig.get_config()` walked the parsed config and replaced every `os.environ/<KEY>` string with `get_secret(value)` before anything initialized the secret manager, so a key held only by the manager resolved to `None` and that `None` was written back into the config. The later fallback in `load_config` could not recover it, because the key now existed with a `None` value. Hoist the initialization into `get_config()`, ahead of the resolution pass, so every entrypoint gets it: the CLI already did this itself, but the microservice entrypoints (`gateway/main.py`, `backend/main.py`) uvicorn the app directly and bypass the CLI. `load_config`'s own call is now redundant and is dropped, so startup builds the manager once instead of building one and discarding it. `get_config()` also runs on management-endpoint request paths, so this returns early once a manager exists rather than rebuilding the client per request. Also warn when a reference the manager would have been asked for resolves to `None`. The reporter had no log line at all to work from. `get_secret` only reaches the manager when reads are enabled and the name is in `hosted_keys`, so `secret_manager_would_be_consulted` mirrors that gate and keeps the warning off env-only references, which are expected rather than an error. |
||
|---|---|---|
| .. | ||
| .coverage_baseline | ||
| __init__.py | ||
| _coverage_check.py | ||
| _pin_check.py | ||
| conftest.py | ||
| test_background_health.py | ||
| test_exception_handlers.py | ||
| test_harness_smoke.py | ||
| test_lifecycle.py | ||
| test_openapi_customization.py | ||
| test_proxy_config.py | ||
| test_routes_anthropic_beta.py | ||
| test_routes_assistants.py | ||
| test_routes_audio.py | ||
| test_routes_chat_completions.py | ||
| test_routes_completions.py | ||
| test_routes_config.py | ||
| test_routes_embeddings.py | ||
| test_routes_invitation.py | ||
| test_routes_login_sso.py | ||
| test_routes_misc.py | ||
| test_routes_model_cost_map.py | ||
| test_routes_model_info.py | ||
| test_routes_model_metrics.py | ||
| test_routes_models.py | ||
| test_routes_moderations.py | ||
| test_routes_onboarding.py | ||
| test_routes_queue.py | ||
| test_routes_threads.py | ||
| test_routes_utils.py | ||
| test_spend_counters.py | ||
| test_streaming_helpers.py | ||
| test_team_model_name_translation.py | ||