litellm/tests/test_litellm/llms/github_copilot
Jason Cook f2653df86b fix(oauth): don't eager-resolve tokens during add_deployment cycles
``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.
2026-04-23 14:58:20 -04:00
..
embedding feat(github-copilot): Add Embedding API support (#17278) 2025-12-01 20:05:28 -08:00
responses fix(github_copilot): preserve encrypted_content in reasoning items for multi-turn conversations (#17130) 2025-12-05 12:42:25 -08:00
test_copilot_db_authenticator.py fix(oauth): jsonify_object() for Prisma Json columns in persist_credential_to_db 2026-04-23 10:58:46 -04:00
test_copilot_oauth_dispatch.py fix(oauth): don't eager-resolve tokens during add_deployment cycles 2026-04-23 14:58:20 -04:00
test_github_copilot_authenticator.py Revert "Litellm dev 07 21 2025 p1 (#12848)" 2025-07-22 18:28:36 -07:00
test_github_copilot_transformation.py fix(oauth): don't eager-resolve tokens during add_deployment cycles 2026-04-23 14:58:20 -04:00