Repository navigation
feat(providers): add xAI support - #873
Merged
Merged
Conversation
Astro-Han
marked this pull request as ready for review
July 13, 2026 13:30
57 tasks done
Astro-Han
force-pushed
the
feat/xai-provider-support
branch
from
July 13, 2026 14:22
d624dca to
0a2b9e1
Compare
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.
Summary
xaiprovider backed by the shared registry and checked-in models.dev snapshot.Why
xAI is the next Phase 3 hosted API slice in #860. This extends the Phase 2 registry seam instead of adding provider-specific lists or routing layers, while preserving exact Grok model IDs and using
/v1/modelsas the account-specific source of truth.Refs #860
Scope
This PR adds only the xAI direct API provider and the shared third-party notice delivery check required by its vendored Lobe Icons asset. It consumes the provider detail-header seam from #872 and does not add a parallel implementation. It does not implement other Phase 3 providers, Phase 7 conformance cleanup, or live-credential smoke evidence.
Verification
npm run typecheck— passednpm test— all affected package suites passed; one resource-timing run hit the existing Rive child pid-file timeout, then the complete Desktop suite passed 2403/2403 on serial rerunnpm --workspace @maka/desktop run e2e— 15/15 passed with one workernpm run check:stale— passedsrc/renderer/public/THIRD_PARTY_LICENSES.txttodist-rendererbyte-for-byte and the post-build notice contract passedGET /v1/models, exactgrok-4.5preservation across both tool-loop requests, local tool execution and result round-trip, and the final assistant responseNo standalone visual artifact is included because this extends the existing provider catalog/detail interaction; the deterministic Desktop E2E covers both rendered entry points and their computed asset contract.
Impact
Adds the persisted provider ID
xaiand theXAI_API_KEY,XAI_API_KEY_FILE, andXAI_BASE_URLheadless configuration. Existing provider IDs and behavior remain compatible.The vendored
xai.svgis byte-identical to@lobehub/[email protected]at Lobe Icons commit32f4083f7a20b67ecdc7b29c0af031ada5a29c52, upstream pathpackages/static-svg/icons/xai.svg, SHA-25689eb7de9f0d02a41cfecd9109e253d7fd3529e27467dee4254faa67f3ac21451. The renderer distribution includes the complete upstream MIT notice.No migration or release-note change is required.
Reviewer notes
The models.dev snapshot supplies model facts but currently omits xAI’s API base URL, so the registry pins the official
https://api.x.ai/v1endpoint. xAI uses the existing OpenAI-compatible adapter because the exercised official contract supports chat completions and model listing; no provider override was added.The xAI SVG declares
fill="currentColor". Because external<img>SVG documents do not inherit the parent color, the shared mark implementation consumes the byte-identical file as a CSS mask withbackground: currentColor; this keeps it legible across themes without modifying the upstream asset.The required independent reviewer found no remaining findings and explicitly passed the final rebased diff after the dark-theme rendering fix.
Ready for review
Verificationexplains why it is not applicable