You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The github_copilot provider ignored a caller-supplied api_key:
_get_openai_compatible_provider_info and validate_environment always took
the key from the global file-backed Authenticator, so per-request
(clientside) credentials injected by a proxy hook were silently replaced
by the shared identity (or failed outright when the token dir was
unseeded). api_base was already honored.
- chat/transformation.py: a passed api_key wins in both
_get_openai_compatible_provider_info and validate_environment; the
authenticator is only consulted when no key is supplied.
- embedding/transformation.py: same one-line precedence fix.
- authenticator.py: new GITHUB_COPILOT_NON_INTERACTIVE env - when set,
get_access_token fails fast instead of starting the interactive
device-code login (verification prompt + minutes-long poll), which
would otherwise run inside a server request path or at Router startup
(Router._add_deployment resolves the provider key at registration
time). Also convert GetAccessTokenError escaping _refresh_api_key into
GetAPIKeyError so callers' error handling applies.
- chat/transformation.py: in non-interactive mode an unseeded
authenticator resolves to api_key=None instead of raising, so
deployment registration at Router startup succeeds; per-request
clientside credentials arrive later.
- tests: passed-key precedence, non-interactive resolution, error
conversion, plus a github_copilot flavor of the clientside-credential
per-key scoping regression (JuliaHub BerriAI#22864) covering api_key+api_base
injection, shared api_base isolation, base_model preservation and key
rotation.
0 commit comments