Skip to content

feat(xai): add grok-build-0.1 model metadata - #1687

Merged
edelauna merged 1 commit into
Zoo-Code-Org:mainfrom
myk1yt:fix/407-add-grok-build-model
Oct 4, 2026
Merged

edelauna merged 1 commit into
Zoo-Code-Org:mainfrom
myk1yt:fix/407-add-grok-build-model

Conversation

@myk1yt

@myk1yt myk1yt commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Related GitHub Issue

Closes: #407

Description

Adds the grok-build-0.1 coding model to the xAI provider catalog in packages/types/src/providers/xai.ts, as scoped in the issue ("independent from OAuth … small API-key provider improvement"):

  • 256K context window, 65,536 max output tokens (matching the rest of the xAI catalog's conservative output caps — third-party docs report no hard output cap for this model, so I did not over-claim)
  • Vision (supportsImages) and prompt caching enabled
  • Pricing: $1.00/1M input, $2.00/1M output, $0.20/1M cache writes and reads (cache-read price per published provider catalogs; writes follow the repo's existing xAI convention of writes == reads)
  • includedTools: ["search_replace"], excludedTools: ["apply_diff"], per the issue's developer notes

The catalog is single-source: the handler, the webview model picker (webview-ui/src/components/settings/constants.ts), and model lookup all consume xaiModels generically, so no other registration is required.

No OAuth, web search, or X search behavior included.

Test Procedure

  • src/api/providers/__tests__/xai.spec.ts (+2 tests, following the existing model-selection pattern):
    • selecting grok-build-0.1 returns its metadata
    • an unknown model id still falls back to xaiDefaultModelId (default behavior unchanged)
  • cd src && ./node_modules/.bin/vitest run api/providers/__tests__/xai.spec.ts → 19/19 passed.
  • tsc --noEmit for packages/types → 0 errors (the satisfies Record<string, ModelInfo> contract still holds).
  • ESLint on both changed files → clean.

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Visual Snapshot (UI changes only): N/A — no UI changes (the model picker consumes the catalog generically).
  • Documentation Impact: No documentation updates are required.
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Visual Snapshots

N/A.

Videos (interaction / animation only)

N/A.

Documentation Updates

  • No documentation updates are required.

Additional Notes

Pricing/context numbers were cross-checked across multiple provider catalogs on 2026-09-20; if xAI publishes different cache pricing for this model, the entry is a one-line fix.

Get in Touch

GitHub: @myk1yt — please tag me here; I monitor notifications.

@coderabbitai

coderabbitai Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: Zoo-Code-Org/Zoo-Code/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 6d8410d9-9d8b-4e16-ae63-9170a0fff780

📥 Commits

Reviewing files that changed from the base of the PR and between c5b5855 and 50c03ea.

📒 Files selected for processing (2)
  • packages/types/src/providers/xai.ts
  • src/api/providers/__tests__/xai.spec.ts

Included review availability: Your plan provides up to 4 included reviews per hour; 1 remains after this review.

📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (6)
Treat model, provider, MCP, path, command, and tool data as untrusted.

⚙️ CodeRabbit configuration file

Files:

  • src/api/providers/__tests__/xai.spec.ts
For persisted settings, verify the complete schema/storage/runtime/webview round trip, shared default semantics, and focused true plus false/unset tests.

⚙️ CodeRabbit configuration file

Files:

  • packages/types/src/providers/xai.ts
Require regression coverage at the lowest valid harness with behavior-focused assertions, including relevant negative, error, false/unset, and boundary cases.

⚙️ CodeRabbit configuration file

Files:

  • src/api/providers/__tests__/xai.spec.ts
Check strict typing and exhaustive behavior across normal, boundary, error, cancellation, retry, and compatibility paths.

⚙️ CodeRabbit configuration file

Files:

  • src/api/providers/__tests__/xai.spec.ts
  • packages/types/src/providers/xai.ts
Verify extension/webview contracts, cancellation and error propagation, VS Code lifecycle correctness, and behavior under retries and partial failure.

⚙️ CodeRabbit configuration file

Files:

  • src/api/providers/__tests__/xai.spec.ts
Act as an adversarial second-opinion reviewer.

⚙️ CodeRabbit configuration file

Files:

  • src/api/providers/__tests__/xai.spec.ts
  • packages/types/src/providers/xai.ts
🔇 Additional comments (2)
packages/types/src/providers/xai.ts (1)

51-63: LGTM!

src/api/providers/__tests__/xai.spec.ts (1)

72-86: LGTM!


📝 Summary

Summary by CodeRabbit

  • New Features

    • Added support for the Grok Build 0.1 model, including image input, prompt caching, a 256K context window, and published token pricing.
  • Bug Fixes

    • Ensured the selected Grok Build 0.1 model is preserved when requested.
    • Unknown model selections now fall back to the default model.

Walkthrough

The xAI model catalog now includes grok-build-0.1 with its capabilities, limits, tools, and pricing. Tests verify explicit selection and fallback for unknown model identifiers.

Changes

xAI model support

Layer / File(s) Summary
Model catalog and selection
packages/types/src/providers/xai.ts, src/api/providers/__tests__/xai.spec.ts
Adds grok-build-0.1 metadata and tests explicit selection plus fallback to xaiDefaultModelId for unknown identifiers.

Priority: ⬇️ Low

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

Change: Feature

🚥 Pre-merge checks | ✅ 8
✅ Passed checks (8 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Issue #407 requires metadata for grok-build-0.1, unchanged API-key behavior, search_replace inclusion, apply_diff exclusion, and focused model tests. packages/types/src/providers/xai.ts adds t…
Out of Scope Changes check ✅ Passed The reviewed changes add one xAI model catalog entry and focused selection/fallback tests. The changes do not add OAuth, web search, X search, or unrelated model registrations. The changes stay within…
Regression Evidence ✅ Passed PASS. The new catalog entry is mechanical model metadata. Focused API tests cover explicit selection of grok-build-0.1, the existing unset-model default path, and the affected unknown-model fallback…
Security Boundaries ✅ Passed No changed path meets a security-boundary failure condition. packages/types/src/providers/xai.ts adds static metadata only. It contains no secrets, PII, dynamic execution, or unvalidated executable …
Persistence Integrity ✅ Passed PASS. The pull request changes only the xAI model catalog and model-selection tests. The catalog addition is an in-memory metadata entry, and the tests only construct handlers and assert selection. Th…
Lifecycle Resource Cleanup ✅ Passed PASS. The pull request changes only xAI model metadata and two model-selection tests. The added code creates no listener, watcher, timer, task, cancellation, disposal, or restart path. The unchanged X…
Title check ✅ Passed The title clearly and concisely identifies the primary change: adding grok-build-0.1 metadata to the xAI provider.
Description check ✅ Passed The description includes the linked issue, implementation details, test procedure, completed checklist, documentation status, and reviewer notes. It is complete and aligned with the pull request chang…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions

github-actions Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Review status

Thanks for contributing. This comment tracks the review sequence and the next action.

Current step: The required review sequence passed. Remaining merge requirements apply.

Review-state labels are managed by this workflow; do not edit them manually. community-approved is managed the same way — do not add or remove it manually. It signals a fresh community code approval for the current head as an advisory priority only; maintainer review is still required.

@codecov

codecov Bot commented Sep 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions github-actions Bot added coderabbit-review-active Required CI passed; CodeRabbit review is active awaiting-coderabbit Waiting for CodeRabbit to approve the latest commit labels Sep 19, 2026
@github-actions github-actions Bot added awaiting-maintainer CodeRabbit approved; waiting for a human maintainer and removed coderabbit-review-active Required CI passed; CodeRabbit review is active awaiting-coderabbit Waiting for CodeRabbit to approve the latest commit labels Sep 19, 2026

@edelauna edelauna left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ty

@edelauna
edelauna added this pull request to the merge queue Oct 4, 2026
@github-actions github-actions Bot removed the awaiting-maintainer CodeRabbit approved; waiting for a human maintainer label Oct 4, 2026
Merged via the queue into Zoo-Code-Org:main with commit 95acd2a Oct 4, 2026
17 checks passed
hanneke-de-vries added a commit to hanneke-de-vries/roo-plus that referenced this pull request Nov 10, 2026
Co-authored-by: Zoo (VP) <[email protected]>
(cherry picked from commit 95acd2a)
Co-authored-by: hanneke-de-vries <[email protected]>
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: add grok-build-0.1 model metadata

2 participants