mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-26 01:12:21 +00:00
``get_llm_provider_logic.py`` instantiates ``ChatGPTConfig`` / ``GithubCopilotConfig`` and calls ``_get_openai_compatible_provider_info`` at every ``add_deployment`` cycle during proxy startup (30s tick when ``STORE_MODEL_IN_DB=True``). The old code eagerly called ``get_access_token()`` / ``get_api_key()`` through the filesystem authenticator at that point. With no tokens on disk this falls through to ``_login_device_code()``, which prints a device prompt to stdout and polls the IdP for up to 15 minutes — blocking startup and (for OAuth credentials stored in the DB) duplicating work that ``validate_environment`` is about to do correctly at request time. Resolution is now a pure metadata pass: pick an ``api_base``, let the ``oauth:<name>`` marker pass through untouched. Actual token resolution still happens at request time via ``resolve_authenticator`` inside ``validate_environment``, which is where we have the full ``litellm_params`` anyway. Tests updated to assert ``get_access_token`` / ``get_api_key`` are NOT called during resolution, and that the ``oauth:`` marker passes through. |
||
|---|---|---|
| .. | ||
| embedding | ||
| responses | ||
| test_copilot_db_authenticator.py | ||
| test_copilot_oauth_dispatch.py | ||
| test_github_copilot_authenticator.py | ||
| test_github_copilot_transformation.py | ||