Skip to content

Conversation

@TejasGhatte
Copy link
Collaborator

@TejasGhatte TejasGhatte commented Jan 5, 2026

Add xAI Provider Support

Added support for the xAI provider, which powers the Grok family of models. This integration enables users to access Grok models through Bifrost with full OpenAI compatibility.

Changes

  • Added xAI provider documentation with detailed operation support
  • Updated provider overview table to include xAI capabilities
  • Added xAI to the model provider enum in OpenAPI schema
  • Added UI support with model placeholders and provider icon
  • Added xAI to known providers list for logging

Type of change

  • Feature
  • Documentation

Affected areas

  • Providers/Integrations
  • UI (Next.js)
  • Docs

How to test

  1. Configure an xAI API key in your environment
  2. Make requests to supported endpoints with xAI models:
# Chat completion example
curl -X POST http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "xai/grok-3-mini",
    "messages": [{"role": "user", "content": "Hello, how are you?"}]
  }'

# Test vision capabilities with Grok vision models
curl -X POST http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "xai/grok-2-vision-1212",
    "messages": [{
      "role": "user",
      "content": [
        {"type": "text", "text": "What is in this image?"},
        {"type": "image_url", "image_url": {"url": "https://example.com/image.jpg"}}
      ]
    }]
  }'

Breaking changes

  • No

Related issues

Implements provider support requested in issue tracker

Checklist

  • I added/updated tests where appropriate
  • I updated documentation where needed
  • I verified builds succeed (Go and UI)

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 5, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added xAI (Grok) provider support: chat, responses, text completions, streaming, vision, and model listing.
  • Documentation

    • New xAI provider docs, provider matrix row, and navigation entry to surface the xAI page.
    • Changelog updated with xAI docs entry.
  • UI

    • xAI added to provider list with label, icon, and model placeholder; API key required.
  • API

    • Public schema now recognizes xAI as an allowed provider.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

Adds the xAI (Grok) provider across documentation, OpenAPI schema, and UI constants: navigation entry and provider docs, ModelProvider enum extended with xai, UI placeholders, API-key requirement, provider label/registry updates, and a new provider SVG icon.

Changes

Cohort / File(s) Summary
Documentation & Navigation
docs/docs.json, docs/providers/supported-providers/overview.mdx, docs/providers/supported-providers/xai.mdx
Inserted providers/supported-providers/xai into docs navigation; added xai.mdx provider guide and support-matrix row describing supported/unsupported operations.
API Schema
docs/openapi/schemas/inference/common.yaml
Added xai to the ModelProvider enum (expanded allowed provider values).
UI Constants & Assets
ui/lib/constants/config.ts, ui/lib/constants/icons.tsx, ui/lib/constants/logs.ts
Added xai placeholder text and set API key required flag; added xai SVG icon component to ProviderIcons; registered xai in KnownProvidersNames and ProviderLabels (xAI).
Changelog
transports/changelog.md
Fixed malformed changelog entry and added docs: updated docs for xai provider.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped through docs and painted an icon bright,
Gave Grok a place to gleam in schema and site,
Placeholders set and labels sewn,
Keys required and pages known,
A tiny rabbit’s tidy delight.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding xAI provider support across UI and documentation. It is specific, relevant, and directly reflects the primary purpose of the changeset.
Description check ✅ Passed The PR description is comprehensive and well-structured, covering all essential template sections including summary, changes, type, affected areas, testing instructions, and a checklist. It provides clear context and actionable details.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c2a0031 and af35195.

📒 Files selected for processing (8)
  • docs/docs.json
  • docs/openapi/schemas/inference/common.yaml
  • docs/providers/supported-providers/overview.mdx
  • docs/providers/supported-providers/xai.mdx
  • transports/changelog.md
  • ui/lib/constants/config.ts
  • ui/lib/constants/icons.tsx
  • ui/lib/constants/logs.ts

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 and usage tips.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

🧪 Test Suite Available

This PR can be tested by a repository admin.

Run tests for PR #1236

Copy link
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@TejasGhatte TejasGhatte marked this pull request as ready for review January 5, 2026 02:31
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b90d942 and 2a4deb0.

📒 Files selected for processing (7)
  • docs/docs.json
  • docs/openapi/schemas/inference/common.yaml
  • docs/providers/supported-providers/overview.mdx
  • docs/providers/supported-providers/xai.mdx
  • ui/lib/constants/config.ts
  • ui/lib/constants/icons.tsx
  • ui/lib/constants/logs.ts
👮 Files not reviewed due to content moderation or server errors (1)
  • ui/lib/constants/icons.tsx
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

always check the stack if there is one for the current PR. do not give localized reviews for the PR, always see all changes in the light of the whole stack of PRs (if there is a stack, if there is no stack you can continue to make localized suggestions/reviews)

Files:

  • docs/providers/supported-providers/overview.mdx
  • docs/docs.json
  • docs/providers/supported-providers/xai.mdx
  • ui/lib/constants/icons.tsx
  • ui/lib/constants/config.ts
  • docs/openapi/schemas/inference/common.yaml
  • ui/lib/constants/logs.ts
🧠 Learnings (2)
📚 Learning: 2025-12-30T05:37:48.365Z
Learnt from: Pratham-Mishra04
Repo: maximhq/bifrost PR: 1180
File: docs/features/mcp/connecting-to-servers.mdx:452-458
Timestamp: 2025-12-30T05:37:48.365Z
Learning: When reviewing documentation PRs in a Graphite-managed stack, first check related or previous PRs in the stack for feature implementations before flagging documentation as incorrect or unsupported. Documentation MDX files often reference features implemented in earlier stack PRs; verify that the documented behavior exists in earlier changes and that the docs accurately reflect the implemented state before requesting edits.

Applied to files:

  • docs/providers/supported-providers/overview.mdx
  • docs/providers/supported-providers/xai.mdx
📚 Learning: 2025-12-31T09:23:15.709Z
Learnt from: Pratham-Mishra04
Repo: maximhq/bifrost PR: 1180
File: docs/openapi/schemas/integrations/bedrock/batch.yaml:81-81
Timestamp: 2025-12-31T09:23:15.709Z
Learning: In OpenAPI schemas, keep definitions modular by placing root-level schemas in separate YAML files under docs/openapi/schemas. Use local references in the form $ref: '#/SchemaName' (do not use $ref: '#/components/schemas/SchemaName'). These files are resolved by the bundler script at docs/openapi/bundle.py. Apply this convention to all YAML files under docs/openapi/schemas (e.g., docs/openapi/schemas/**/*.yaml).

Applied to files:

  • docs/openapi/schemas/inference/common.yaml
🔇 Additional comments (9)
docs/providers/supported-providers/overview.mdx (1)

38-38: LGTM!

The xAI provider row is correctly added to the support matrix following the established pattern. The support indicators accurately reflect a text/chat-focused provider with OpenAI-compatible operations.

docs/openapi/schemas/inference/common.yaml (1)

25-25: LGTM!

The xai enum value is correctly added to the ModelProvider definition, expanding the set of allowed providers. The placement at the end is consistent with the existing non-alphabetical ordering.

docs/docs.json (1)

110-111: LGTM!

The xAI documentation page is correctly added to the navigation structure. The JSON remains valid and the placement maintains the existing organization pattern.

ui/lib/constants/logs.ts (2)

21-21: LGTM!

The xai provider is correctly added to KnownProvidersNames, which automatically extends the derived ProviderName type throughout the UI.


65-65: LGTM!

The provider label mapping is correctly added with proper brand capitalization ("xAI"), maintaining consistency with the ProviderLabels record type.

ui/lib/constants/config.ts (2)

51-51: LGTM!

The xAI model placeholder provides clear examples that align with the models mentioned in the PR description, helping users configure the provider correctly.


73-73: LGTM!

The API key requirement is correctly set to true for xAI, consistent with other external provider services.

docs/providers/supported-providers/xai.mdx (2)

91-134: Remaining sections are clear and well-documented.

The Responses API, Text Completions, List Models, and Unsupported Features sections provide appropriate detail and clarity. The unsupported features table effectively communicates limitations with clear reasoning.


1-33: Documentation is accurate and well-aligned with implementation.

The front matter, overview, and supported operations table are accurate. All claimed endpoints are confirmed:

  • /v1/responses — Responses API (supported and tested)
  • /v1/chat/completions — Chat Completions (supported and tested)
  • /v1/completions — Text Completions (supported and tested)
  • /v1/models — List Models (supported and tested)
  • ✅ Vision support — Confirmed in tests (image URLs and base64)
  • ✅ Reasoning support — Confirmed in tests
  • ✅ Tool calling — Confirmed in tests
  • ✅ Embeddings marked unsupported — Correctly matches implementation

All unsupported operations (Speech, Transcription, Batch, Files) are accurately marked and properly explained.

@TejasGhatte TejasGhatte force-pushed the 01-05-feat_added_xai_provider_in_ui_and_docs branch from 2a4deb0 to c2a0031 Compare January 5, 2026 07:10
@TejasGhatte TejasGhatte force-pushed the 01-05-feat_added_xai_provider_in_ui_and_docs branch from c2a0031 to af35195 Compare January 5, 2026 07:53
Copy link
Contributor

akshaydeo commented Jan 5, 2026

Merge activity

  • Jan 5, 8:03 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jan 5, 8:04 AM UTC: @akshaydeo merged this pull request with Graphite.

@akshaydeo akshaydeo merged commit 77ad852 into main Jan 5, 2026
9 of 10 checks passed
@akshaydeo akshaydeo deleted the 01-05-feat_added_xai_provider_in_ui_and_docs branch January 5, 2026 08:04
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.

3 participants