feat: add xAI Grok OAuth provider - #1
Open
anandh8x wants to merge 1 commit into
Open
Conversation
Adds a separate descriptor-backed xAI OAuth route for Grok subscription accounts using secure token storage, PKCE browser auth, refresh/retry behavior, and Responses transport routing while preserving the existing xAI API-key provider. Constraint: OpenClaude does not yet have an official xAI OAuth public client ID; production release remains blocked until one is issued. Constraint: Existing xai API-key provider must continue resolving to https://api.x.ai/v1 with chat completions by default. Rejected: Hardcode Hermes Agent client ID | only suitable for manual testing and must not ship. Rejected: Reuse Codex OAuth storage | xAI OAuth tokens need separate provider identity and refresh semantics. Confidence: medium Scope-risk: moderate Directive: Do not merge/release until OpenClaude has its own official xAI OAuth public client ID. Tested: bun test src/services/api/xaiOAuth.test.ts src/utils/xaiOAuthCredentials.test.ts src/services/api/providerConfig.xaiOAuth.test.ts src/integrations/compatibility.test.ts src/integrations/routeMetadata.test.ts src/utils/providerProfiles.test.ts Tested: bun run integrations:check Tested: bun run build Tested: git diff --check Not-tested: bun run typecheck (repo has pre-existing project-wide TypeScript failures; interrupted reruns were not used as completion evidence).
jatmn
pushed a commit
that referenced
this pull request
Jul 5, 2026
…1782) * chore(deps): clean npm install — fix CVEs, silence warnings - bump undici 7.24.6 → 7.28.0 (7 high CVEs: TLS bypass, header injection, DoS, cache poisoning, SameSite downgrade, cross-origin routing) - bump ws 8.20.0 → 8.21.0 (2 high CVEs: uninitialized memory disclosure, memory exhaustion DoS) - add allowScripts for sharp + protobufjs to silence install-script warnings - vendor node-domexception shim (re-exports native DOMException) and override the deprecated polyfill pulled transitively by google-auth-library → gaxios → node-fetch@3 → fetch-blob Result: `npm install` reports 0 vulnerabilities, 0 warnings. Co-Authored-By: OpenClaude <openclaude@gitlawb.com> * chore(deps): update bun.lock for undici/ws bumps and node-domexception override CI runs `bun install --frozen-lockfile`, which requires bun.lock to match package.json. The previous commit bumped undici/ws and added the node-domexception shim override but didn't include the regenerated lockfile, causing frozen-lockfile CI to fail. Co-Authored-By: OpenClaude <openclaude@gitlawb.com> * fix(publish): include vendor/node-domexception-shim in npm tarball The file: override in package.json points at vendor/node-domexception-shim, but the files array didn't list vendor/, so npm pack excluded it. End-user npm installs would fail resolving the override. Add vendor/node-domexception-shim/ to the files array. Verified via npm pack --dry-run: tarball now contains both shim files (12 → 14 files). Addresses reviewer finding #1. Co-Authored-By: OpenClaude <openclaude@gitlawb.com> --------- Co-authored-by: OpenClaude <openclaude@gitlawb.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.
Summary
Important
Verification
Not tested