Skip to content

fix(oauth): support Test Connection for xAI OAuth - #8862

Merged
diegosouzapw merged 2 commits into
cheaper-inference:release/v3.8.49from
allanvb:fix/xai-oauth-test-connection
Jul 28, 2026
Merged

diegosouzapw merged 2 commits into
cheaper-inference:release/v3.8.49from
allanvb:fix/xai-oauth-test-connection

Conversation

@allanvb

@allanvb allanvb commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes dashboard Test Connection for xAI OAuth (Grok) (xai-oauth, alias xao).

Until now, testing an xAI OAuth connection always failed with "Provider test not supported" and could leave a healthy account marked as error. The OAuth connection id was never wired into the OAuth test table, even though the shared api.x.ai chat probe already existed for the apikey xai entry.

Test Connection now uses the same live probe the runtime chat path uses: POST https://api.x.ai/v1/chat/completions with the connection access token.

Implementation

Validation

  • Focused tests: node --import tsx/esm --test tests/unit/xai-oauth-test-supported.test.ts tests/unit/oauth-test-config-8408.test.ts tests/unit/grok-cli-oauth-test-supported-7610.test.ts (6 passed)
  • npm run lint
  • New automated tests in this PR

Coverage Notes

Change is small and lives in the OAuth Test Connection config plus unit coverage around testOAuthConnection. Focused tests cover config presence, the unsupported-path regression for xai-oauth, and the xao alias probe URL.

Reviewer Notes

No migration, no feature flag.

Probe path matches registry/runtime: xai-oauth inherits https://api.x.ai/v1/chat/completions from the apikey xai provider. Auth is Authorization: Bearer *** same as XaiExecutor/BaseExecutor.buildHeaders`.

xao is included because that public alias is used elsewhere in routing/usage; DB connections are normally xai-oauth.

Manual check: connect xAI OAuth -> Providers -> Test Connection. Expected: real auth result (ok / 401), not "Provider test not supported".

Wire xai-oauth / xao into OAUTH_TEST_CONFIG with the shared api.x.ai
chat probe so dashboard Test Connection no longer returns
"Provider test not supported" on healthy accounts.
@allanvb
allanvb requested a review from diegosouzapw as a code owner July 28, 2026 15:33
@diegosouzapw
diegosouzapw merged commit 7f83b4b into cheaper-inference:release/v3.8.49 Jul 28, 2026
15 of 16 checks passed
diegosouzapw added a commit that referenced this pull request Jul 28, 2026
…redited)

Second aggregation pass, for the PRs merged after the main reconciliation:
#8860, #8861, #8862, #8863, #8865, #8866.

The `### 📝 Maintenance` heading added to the living section in 26a7783 held —
[3.8.47] stays at its 234 bullets instead of absorbing this cycle's maintenance
entries. Credits attached where the fragment carried the number only in its
filename: @HouMinXi (#8860, #8865), @artickc (#8863), @rafaeldrincon (#8866).
#8862 already carried its own link and credit.

[3.8.49]: 1172 -> 1178 bullets · contributors 155 -> 156 · 42 i18n mirrors synced.
@diegosouzapw diegosouzapw mentioned this pull request Jul 28, 2026
@allanvb
allanvb deleted the fix/xai-oauth-test-connection branch July 28, 2026 17:50
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…8862)

* fix(oauth): support Test Connection for xAI OAuth

Wire xai-oauth / xao into OAUTH_TEST_CONFIG with the shared api.x.ai
chat probe so dashboard Test Connection no longer returns
"Provider test not supported" on healthy accounts.

* chore(changelog): add changelog for xai-oauth test connection support

---------

Co-authored-by: allanvb <allanvb@users.noreply.github.com>
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…redited)

Second aggregation pass, for the PRs merged after the main reconciliation:
cheaper-inference#8860, cheaper-inference#8861, cheaper-inference#8862, cheaper-inference#8863, cheaper-inference#8865, cheaper-inference#8866.

The `### 📝 Maintenance` heading added to the living section in ae5bf9e held —
[3.8.47] stays at its 234 bullets instead of absorbing this cycle's maintenance
entries. Credits attached where the fragment carried the number only in its
filename: @HouMinXi (cheaper-inference#8860, cheaper-inference#8865), @artickc (cheaper-inference#8863), @rafaeldrincon (cheaper-inference#8866).
cheaper-inference#8862 already carried its own link and credit.

[3.8.49]: 1172 -> 1178 bullets · contributors 155 -> 156 · 42 i18n mirrors synced.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants