Commit ac5e790
committed
fix(github_copilot): main.py header block honors resolved api_key
The openai-compatible completion branch in main.py builds the Copilot
default headers with a fresh Authenticator().get_api_key() regardless
of the api_key already resolved for the call, so a clientside per-user
key raised GetAPIKeyError (mapped to AuthenticationError) whenever the
file-backed authenticator was unseeded. Use the resolved api_key and
only fall back to the authenticator when none is present. Found in
end-to-end verification of per-user Copilot credentials.1 parent ff36aeb commit ac5e790
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2381 | 2381 | | |
2382 | 2382 | | |
2383 | 2383 | | |
2384 | | - | |
2385 | | - | |
| 2384 | + | |
| 2385 | + | |
| 2386 | + | |
| 2387 | + | |
| 2388 | + | |
| 2389 | + | |
| 2390 | + | |
2386 | 2391 | | |
2387 | 2392 | | |
2388 | 2393 | | |
| |||
0 commit comments