Commit ba7673f
CodeWhale Bot
fix(client): keep codex env-token auth working on custom endpoints
PR #5716 diverted OpenaiCodex credential resolution to the generic key
resolver whenever provider_uses_custom_endpoint() is true, which dropped
an explicit OPENAI_CODEX_ACCESS_TOKEN for custom-base-url setups. The
shared-seam wiremock test proves the regression: the mock only answers
Bearer test-token, so the request came back 404 on all three CI OSes
(client::responses::tests::responses_stream_open_preserves_wire_headers_
through_shared_seam). The manual if-condition formatting also failed the
Lint job's cargo fmt --check.
Restore the pre-PR precedence by trying codex_credentials() first: env
credentials still win on custom endpoints (codex_credentials checks env
before the official-endpoint consent grant), the official endpoint keeps
propagating OAuth errors, and only a custom endpoint with no env token
falls back to deepseek_api_key() — preserving the contributor's goal of
letting a custom endpoint authenticate with its own configured key.
Signed-off-by: CodeWhale Bot <bot@codewhale.net>1 parent 20ac186 commit ba7673f
1 file changed
Lines changed: 23 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1195 | 1195 | | |
1196 | 1196 | | |
1197 | 1197 | | |
1198 | | - | |
1199 | | - | |
1200 | | - | |
1201 | | - | |
1202 | | - | |
1203 | | - | |
1204 | | - | |
1205 | | - | |
1206 | | - | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
1207 | 1219 | | |
1208 | 1220 | | |
1209 | 1221 | | |
| |||
1700 | 1712 | | |
1701 | 1713 | | |
1702 | 1714 | | |
1703 | | - | |
1704 | | - | |
1705 | | - | |
| 1715 | + | |
1706 | 1716 | | |
1707 | 1717 | | |
1708 | 1718 | | |
| |||
1790 | 1800 | | |
1791 | 1801 | | |
1792 | 1802 | | |
1793 | | - | |
| 1803 | + | |
1794 | 1804 | | |
1795 | 1805 | | |
1796 | 1806 | | |
| |||
0 commit comments