fix(auxiliary): add xAI OAuth route to auth refresh provider resolver - #60397
Closed
isheng-eqi wants to merge 2 commits into
Closed
fix(auxiliary): add xAI OAuth route to auth refresh provider resolver#60397isheng-eqi wants to merge 2 commits into
isheng-eqi wants to merge 2 commits into
Conversation
_auth_refresh_provider_for_route() maps auto-routed client base URLs to provider names so auth refresh works for auto→provider routes (NousResearch#20832). The resolver covered Copilot, Codex, Anthropic, and Nous — but missed xAI OAuth. The sibling _resolve_provider_from_client() function already maps api.x.ai to xai-oauth; add the same mapping here so auto-routed xAI calls can refresh their short-lived OAuth token. Refs: NousResearch#59837, NousResearch#20832
12 tasks
Contributor
|
Thanks for the focused xAI OAuth regression report. Automated hermes-sweeper review found that current
Closing as implemented on main. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
_auth_refresh_provider_for_route()maps auto-routed base URLs to providers (#59837) but missed xAI OAuth. The sibling_resolve_provider_from_client()already mapsapi.x.ai. This adds the same mapping so auto-routed xAI calls can refresh their short-lived OAuth token.Related Issue
Fixes sibling path of #59837 (#20832).
Type of Change
Changes Made
agent/auxiliary_client.py: Add xAI OAuth mapping to_auth_refresh_provider_for_route()tests/agent/test_auxiliary_xai_auth_route.py: Route mapping + passthrough testsHow to Test