fix(oauth): offer xAI chat models returned by GET /v1/models - #844
Merged
Merged
Conversation
The pinned pi-ai catalog stops at grok-4.6, so a signed-in Grok account rejects grok-4.7 before the request is sent. When the account token can read /v1/models, that chat-model list is the authority and the pinned catalog is only the fallback.
Owner
|
Maintainer-side handling so this could be gated and landed:
Independent check of the premise: pi-ai 0.86.1's pinned xAI catalog ships only |
1 of 2 tasks
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.
Summary
GET /v1/modelsas the list of conversation models it may use.grok-4.7is offered as soon as Grok returns it, without waiting for the pinned pi-ai catalog to ship that id.grok-imagine-*and similar) stay out of the chat picker. If the request fails, the pinned catalog remains the fallback, so Copilot and the other static vendors are unchanged.grok-4.6, then 4.5, then 4.3) instead of the 128k generic shape.Test plan
node --test test/vendor-oauth-login.test.mjs test/anthropic-oauth-retry.test.mjs(38 passing), including a login whose/modelsbody containsgrok-4.7andgrok-imagine-imagegrok-4.7is selectable and a turn no longer reportsVendor account does not offer model "grok-4.7"