Skip to content

fix(runtime): keep newly released Grok models on xAI OAuth discovery - #3118

Merged
Astro-Han merged 3 commits into
apache:mainfrom
1625567290:fix/xai-oauth-trust-server-models
Aug 16, 2026
Merged

fix(runtime): keep newly released Grok models on xAI OAuth discovery#3118
Astro-Han merged 3 commits into
apache:mainfrom
1625567290:fix/xai-oauth-trust-server-models

Conversation

@1625567290

@1625567290 1625567290 commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary

xai-oauth model discovery used filter: 'fallback-models', so /v1/models ids were dropped unless they were already in the bundled models.dev snapshot. That snapshot currently tops out at grok-4.5, so SuperGrok / X Premium connections hide grok-4.6 even though the account can use it. The xai API-key path has no such filter.

This PR removes the local whitelist on xai-oauth. fallbackModels still bootstrap the connection before the first successful fetch. Discovery stays on the same unfiltered OpenAI-protocol path already covered by provider-contract-matrix. grok-4.6 remains the reproduction on #3116, not a snapshot-pinned test fact.

Fixes #3116

Verification

  • npx biome check on the changed files — clean
  • npm --workspace @maka/core run typecheck — clean
  • npm --workspace @maka/runtime run typecheck — clean
  • packages/runtime model-fetcher11/11
  • provider-contract-matrix discovery includes xai-oauth and still passes

Not run: live xAI OAuth fetch against a SuperGrok account

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope:

Grok authored the filter removal and this PR description.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@1625567290, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 43 minutes

Limit details: You’ve used all 3 included reviews currently available under your plan.

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 06ae1a46-eab7-4b70-854d-1ccd7260fd4e

📥 Commits

Reviewing files that changed from the base of the PR and between 28cb281 and 3553263.

📒 Files selected for processing (1)
  • apps/desktop/src/renderer/locales/plan-mode-copy.ts

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 324638f5-4a96-4b4c-8d55-1d4e6272fa3b

📥 Commits

Reviewing files that changed from the base of the PR and between 8b79a6d and 28cb281.

📒 Files selected for processing (2)
  • packages/core/src/provider-registry.ts
  • packages/runtime/src/__tests__/model-fetcher.test.ts
💤 Files with no reviewable changes (2)
  • packages/runtime/src/tests/model-fetcher.test.ts
  • packages/core/src/provider-registry.ts

Included review availability: Your plan includes up to 3 reviews per rolling hour; 1 remains after this review.


📝 Walkthrough

Summary

This PR fixes xAI OAuth model discovery. It removes the local fallback-models filter, which hid server-listed models absent from the bundled models.dev snapshot, such as grok-4.6.

The change extends the existing server discovery path. It does not create a parallel discovery path. fallbackModels remain available for bootstrap and discovery-failure cases.

The change is the smallest coherent solution. It removes one filter and keeps the existing fallback behavior. The unused PROVIDER_DEFAULTS test import was also removed. No further deletion or simplification is evident without weakening regression coverage.

Validation

  • Biome checks passed for changed files.
  • Core and runtime typechecks passed.
  • Model-fetcher tests passed: 12/12.
  • Provider contract matrix passed with xai-oauth.
  • Regression coverage confirms that grok-4.6 remains available when it is absent from the local snapshot.
  • A live OAuth fetch against a SuperGrok account was not run.

Review-relevant risks

The change affects user-visible xAI OAuth model listings. The server now controls which discovered models appear instead of the local snapshot allowlist. Any material change to user-visible behavior requires independent human review under repository policy.

No public contract, security, licensing, release, or governance effect was identified in the current diff. Required-check status remains unverified without direct check evidence.

The person performing the merge must review the final diff. A maintainer makes the final determination.

Walkthrough

The xAI OAuth provider no longer filters discovered models against fallback models. The model-fetcher tests remove an unused import.

Changes

xAI OAuth model discovery

Layer / File(s) Summary
Remove discovery filter and clean test import
packages/core/src/provider-registry.ts, packages/runtime/src/__tests__/model-fetcher.test.ts
The xai-oauth provider no longer applies the fallback-models discovery filter. The tests remove the unused PROVIDER_DEFAULTS import.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 28cb2

The change allows newly released xAI OAuth models to appear without relying on the bundled snapshot, with regression coverage for the affected discovery path; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The filter removal addresses issue #3116, but the provided changes do not show the required regression test for an unlisted model such as grok-4.6. Add a regression test that verifies xai-oauth discovery retains a model absent from the bundled fallback snapshot, such as grok-4.6.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the xAI OAuth discovery fix and the newly released Grok models it preserves.
Description check ✅ Passed The description follows the template and includes the problem, fix, issue link, verification results, AI use, and checklist status.
Out of Scope Changes check ✅ Passed The changes are limited to removing the xai-oauth discovery filter and deleting its unused test import, which align with issue #3116.
Ai Use Disclosure ✅ Passed The PR selects substantive generative use, names Grok and its scope, and both introduced commits contain standalone Generated-by: Grok trailers.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

Comment thread packages/runtime/src/__tests__/model-fetcher.test.ts Outdated
xai-oauth model fetch used filter: fallback-models, so ids absent from
the bundled snapshot were dropped. Trust the server listing like xai
API-key connections. fallbackModels remain the bootstrap fallback.

Fixes apache#3116

Generated-by: Grok
After removing the fallback-models filter, xai-oauth uses the same
unfiltered protocol discovery path already covered by the provider
contract matrix. Do not pin grok-4.6 as a snapshot fact.

Generated-by: Grok
apache#2688 imported Plan Mode locale types from the removed @maka/core root
barrel. Other locale catalogs already use @maka/core/ui-locale and
@maka/core/plan. The root import breaks desktop main typecheck and
cascades through every PR that merges with main.

Generated-by: Grok
@1625567290
1625567290 force-pushed the fix/xai-oauth-trust-server-models branch from 28cb281 to 3553263 Compare August 16, 2026 11:39
@1625567290

Copy link
Copy Markdown
Contributor Author

The red CI after the last test-only commit was not that change. main broke desktop typecheck when #2688 imported Plan Mode locale types from the removed @maka/core root barrel (TS2307 in plan-mode-copy.ts). That fails typecheck and then test_workspaces / test_runtime_host / test / windows_recovery on every PR merged with current main.

Rebased onto main and pointed those imports at @maka/core/plan and @maka/core/ui-locale, same as the other locale catalogs. Dedicated fix is also in #3119.

@Astro-Han

Copy link
Copy Markdown
Contributor

Fast path self-merge: low impact, easy to reverse — a runtime model-discovery change with all required checks passing (typecheck, test_workspaces, test_runtime_host, e2e, test, storybook, windows_recovery). The P2 review comment (drop the grok-4.6 snapshot case) was resolved by the author, and the human contributor @yuhan reviewed the final diff and chose the fast path.

@Astro-Han
Astro-Han merged commit dd02553 into apache:main Aug 16, 2026
12 checks passed
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.

xai-oauth model discovery hides newly released models (e.g. grok-4.6)

2 participants