feat(providers): add xAI (Grok) to built-in providers - #899
Merged
Conversation
Contributor
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 1 selected item(s). |
wu21-web
suggested changes
Aug 14, 2026
Co-authored-by: Tao Xin <wu2196674@icloud.com>
Co-authored-by: Tao Xin <wu2196674@icloud.com>
Co-authored-by: Tao Xin <wu2196674@icloud.com>
Githab-capibara
added a commit
to Githab-capibara/open-code-review
that referenced
this pull request
Aug 23, 2026
* feat(llm): add xAI Grok provider preset * Update internal/llm/providers.go Co-authored-by: Tao Xin <wu2196674@icloud.com> * Update internal/llm/providers.go Co-authored-by: Tao Xin <wu2196674@icloud.com> * apply ccec85 for test * Update internal/llm/providers.go Co-authored-by: Tao Xin <wu2196674@icloud.com> --------- Co-authored-by: Tao Xin <wu2196674@icloud.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
xAI (Grok) is rapidly gaining traction as a major AI infrastructure and Model-as-a-Service (MaaS) provider. This PR
adds the xAI (Grok) to built-in providers.
The preset targets xAI's OpenAI-compatible endpoint (https://api.x.ai/v1) with the XAI_API_KEY environment variable.
Although OCR supports all three protocols (anthropic, openai chat-completions, openai-responses), this preset is wired
with the OpenAI chat-completions protocol, seeded with current-generation models (grok-4.6, grok-4.5, grok-4.3,
grok-4.20-0309-reasoning, grok-4.20-0309-non-reasoning, grok-4.20-multi-agent-0309, grok-build-0.1) verified against
the official catalog. Built-in provider tables synced in en/zh/ja/ru docs.
Type of Change
How Has This Been Tested?
make testpasses locallyManual testing (describe below)
make test passes locally — all internal/llm provider tests pass, including the new TestLookupProvider_XAIDetails.
Pre-existing, environment-sensitive failures in resolver_shellrc_test.go (TestShellRCFiles, TestTryShellRC) fail
identically on main and are unrelated to this PR.
Manual testing (describe below): make check passes (license, english, tidy, gofmt — no diffs, vet); go build
./cmd/opencodereview succeeds.
Checklist
go fmt,go vet)Related Issues
none