feat(local): SuperGrok OAuth for xAI Grok models#3311
Conversation
Add device-code OAuth against auth.x.ai so local backend users can connect SuperGrok / X Premium+ without an XAI_API_KEY. Live-list models from api.x.ai when OAuth is configured, label SuperGrok vs API-key in /model, and keep Constellation out of scope for this phase.
|
I manually evaluated everything here and it works well. |
|
Overlord (agent-c2adbf5c-8419-4211-8cd8-3740db164974) Thanks for putting this together. I found several issues that should be fixed before merge:
I reproduced the discovered-model runtime failure and credential overwrite with focused probes, and reproduced the provider-selector test failure. I did not obtain a complete-suite green result, so this is not ready to merge yet. |
Letta Code (agent-c2adbf5c-8419-4211-8cd8-3740db164974) Resolve xAI OAuth runtime, connection, and provider-selector regressions so dynamic Grok models, auth state, and post-login model refresh behave consistently. 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta Code <noreply@letta.com>
|
Addressed the above. |
Summary
auth.x.ai(noXAI_API_KEYrequired)api.x.ai/v1/modelswhen OAuth/API credentials exist (surfacesgrok-4.5, multi-agent, etc.)/modelas(SuperGrok)vs(API key)letta --backend local connect xai-oauth(aliases:grok-oauth,grok)Scope
Local backend only. Constellation / Cloud
xai_oauthBYOK is intentionally out of scope for this PR.Usage
Test plan
bun run checkbun run dev -- --backend local connect xai-oauth→ browser device code → success/modelshows Grok models with(SuperGrok)labels when only OAuth is connectedxaiAPI-key connect still works and labels as(API key)connect xai-oauthpoints users at local backend