Repository navigation
Description
What happened
Connected xAI OAuth (SuperGrok / X Premium). The connection's model list does not include newly released Grok models — e.g. grok-4.6 — even though the account can use them and an xai API-key connection listing the same GET /v1/models endpoint shows them. Expected: the OAuth connection lists the chat models the account can use, including freshly released ones, without waiting for a local snapshot update.
How to reproduce
- Add an xAI OAuth connection (SuperGrok / X Premium) in Settings → Models, then let the model fetch complete (or trigger "re-fetch models" later).
- Open the connection's model list.
- Observe that
grok-4.6is absent, while anxaiAPI-key connection (samehttps://api.x.ai/v1base) lists it.
Environment
- Maka version or commit:
8b79a6dae(main) - OS and version: macOS
- Surface: Desktop
- Node.js version: 24.18.1 (running from source)
Logs, screenshots, or additional context
Root cause. xai-oauth model discovery is configured with filter: 'fallback-models' in packages/core/src/provider-registry.ts:
'xai-oauth': {
...
modelDiscovery: {
kind: 'protocol',
auth: 'oauth-bearer',
filter: 'fallback-models', // ← id whitelist against the local snapshot
},
},filterDiscoveredModels (packages/runtime/src/model-fetcher.ts) keeps only ids present in fallbackModels = xaiModelIds, i.e. the tool-calling models from the bundled models.dev snapshot (GENERATED_MODELS_DEV_METADATA.xai, synced by scripts/sync-model-metadata.mjs). That snapshot currently tops out at grok-4.5 (lastUpdated: 2026-07-08), so a /models response containing grok-4.6 is silently filtered out. The xai API-key provider has no filter and therefore lists the model.
Why not switch to another filter. xAI's /models returns OpenAI-style entries (id/object/created/owned_by) without capability or type fields, so both remaining filter options would return an empty list for this provider:
filter: 'tool-capable'— readscapabilities.functionCallingfrom the response (absent)filter: 'language-models'— readstype === 'language'from the response (absent)
Other OAuth/subscription providers that discover models server-side do not use a local whitelist: github-copilot filters on server fields (model_picker_enabled, policy.state, supports.tool_calls), openai-codex drops visibility: hide/hidden and sorts by server priority, and claude-subscription cannot discover at all (session-scoped token, /v1/models returns 401) so it uses kind: 'fallback'. xai-oauth is the only OAuth provider hard-pinning discovery to the local snapshot.
Proposed fix. Trust the server listing, matching xai / github-copilot / openai-codex:
modelDiscovery: { kind: 'protocol', auth: 'oauth-bearer' },fallbackModels stays as the bootstrap fallback (before first fetch / on discovery failure) but stops acting as a hard cap. Add a regression test in packages/runtime/src/__tests__/model-fetcher.test.ts asserting that an id absent from the snapshot (e.g. grok-4.6) survives xai-oauth discovery.
Consideration. If the OAuth /models listing ever includes non-chat models (imagine/voice), a small negative exclude can be added later; the xai API-key path already surfaces the full listing today without reported issues.
Activity
1625567290 commentedon Aug 16, 2026
I'm working on this. I'll drop the
fallback-modelsdiscovery filter onxai-oauthso the server listing is trusted, and add a regression that an id absent from the local snapshot (e.g.grok-4.6) still survives fetch.Grok is assisting with the implementation; I will review the change and remain the human contributor of record.
简体中文对照
我来处理。去掉
xai-oauth的fallback-models发现过滤,改信服务器列表,并加回归:本地 snapshot 里没有的 id(例如grok-4.6)在 fetch 后仍然保留。Grok 协助实现;我会审阅改动,并作为 human contributor of record。
fix(runtime): keep newly released Grok models on xAI OAuth discovery
fix(runtime): keep newly released Grok models on xAI OAuth discovery (#…