Skip to content

feat(provider): add xxapi - #2479

Merged
zerob13 merged 1 commit into
ThinkInAIXYZ:devfrom
xxapi-ai:feat/provider-xxapi
Oct 29, 2026
Merged

zerob13 merged 1 commit into
ThinkInAIXYZ:devfrom
xxapi-ai:feat/provider-xxapi

Conversation

@xxapi-ai

@xxapi-ai xxapi-ai commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Adds xxapi as a disabled built-in OpenAI-compatible provider, in the same shape as Y-API (#2393) and AtmoRouter (#2464): a defaults entry, a registry entry, an icon and two focused tests. Insertions only; no existing line changes.

xxapi (https://xxapi.ai) is a pay-as-you-go API relay for Claude and GPT models.

  • defaults.ts: xxapi, base URL https://xxapi.ai/v1, disabled by default. Keys at https://xxapi.ai/keys, getting-started guide at https://docs.xxapi.ai/getting-started, model list and prices at https://xxapi.ai/pricing.
  • providerRegistry.ts: ...OPENAI_BASE with credentialStrategy: 'api-key' and embeddingStrategy: 'none', so it resolves to the existing openai-compatible runtime with modelSource: 'openai' and checkStrategy: 'fetch-models'. No embeddings endpoint is offered.
  • GET /v1/models needs a key: on 2026-10-28, /v1/models and /v1/chat/completions returned 401 without a valid key, so the fetch-models check rejects a bad key. Each key belongs to one plan and /v1/models lists the models that key can call.
  • Icon: our swift mark as a single-path currentColor SVG, registered with the mono icons so it inverts in dark mode.

Validation: test/main/provider/defaultProviders.test.ts passed locally with Vitest 4.1.10, including the new case. The new basicApiKeyProviders.test.ts case imports the full AI SDK stack, which I didn't install, so I ran the same assertion in a throwaway file against providerRegistry.ts (passed, file deleted). I did not run format, lint or typecheck locally; the added lines follow the surrounding style (single quotes, no semicolons, under 100 columns).

Disclosure: I run xxapi, so this is a self-submitted listing. Prepared with AI assistance (Claude Code).

Summary by CodeRabbit

  • New Features
    • Added xxapi as an OpenAI-compatible provider option, with its service links and configuration details. It is disabled by default.

Disabled built-in OpenAI-compatible provider for https://xxapi.ai/v1
with live /models discovery, the xxapi swift icon (mono) and focused
defaults and registry tests.
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b5203473-bca4-497d-b9a2-1a4612643b23
Commits

Reviewing files that changed from the base of the PR and between 48c5460 and c83814a.

Files ignored due to path filters: 1
  • src/renderer/src/assets/llm-icons/xxapi.svg is excluded by !**/*.svg
Files selected for processing: 5
  • src/main/provider/defaults.ts
  • src/main/provider/providerRegistry.ts
  • src/renderer/src/components/icons/modelIconRegistry.ts
  • test/main/provider/basicApiKeyProviders.test.ts
  • test/main/provider/defaultProviders.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Walkthrough

The change adds XXAPI as a disabled OpenAI-compatible provider with API-key authentication and no embedding support. It also registers the XXAPI icon and adds tests for the provider configuration.

Changes: XXAPI provider registration

Layer / File(s) Summary
Provider configuration and tests
src/main/provider/defaults.ts, src/main/provider/providerRegistry.ts, test/main/provider/defaultProviders.test.ts, test/main/provider/basicApiKeyProviders.test.ts
The defaults and registry define XXAPI as an OpenAI-compatible, API-key provider with embeddings disabled. Tests check its configuration and provider definition.
Provider icon mapping
src/renderer/src/components/icons/modelIconRegistry.ts
The registry imports the XXAPI icon, maps it to the xxapi provider key, and includes it in the monochrome icon set.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Feature

Suggested reviewers: zerob13

Merge Risk: Minimal · up to c8381

The disabled XXAPI provider registration and icon can be merged without an identified actionable risk.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "feat(provider): add xxapi" states the main change. The PR adds xxapi as a disabled-by-default, OpenAI-compatible provider. The change touches the defaults entry, the registry entry, the ico…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "feat(provider): add xxapi" states the main change. The PR adds xxapi as a disabled-by-default, OpenAI-compatible provider. The change touches the defaults entry, the registry entry, the icon mapping, and the tests, and all of these support the same provider addition. The title is concise, specific, and follows a conventional commit style. It does not describe unrelated work.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 5 files.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@zerob13 zerob13 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Verdict: approve. No blocking findings.

This adds xxapi as a disabled built-in provider and touches only the six files that provider listings normally touch: defaults, registry, icon, icon registry, and two tests. It is additions only — no existing line is changed. The shape matches #2464 (AtmoRouter), which is the smallest of the recent provider PRs.

What I checked, and why it is fine:

  • Registration resolves correctly. xxapi picks up the existing OpenAI-compatible runtime with credentialStrategy: 'api-key' and embeddingStrategy: 'none', so it inherits modelSource: 'openai' and checkStrategy: 'fetch-models' from OPENAI_BASE. No custom adapter, no new branch in aiSdkProvider.ts, no provider-db entry — all of which would have been unnecessary for a plain relay.
  • Model discovery needs a key, so the check is meaningful. GET https://xxapi.ai/v1/models returned 401 without a key during review, so fetch-models will reject a bad key instead of silently passing. That justifies not adding a generate-text check.
  • defaultBaseUrl is derived, not duplicated. DEFAULT_PROVIDERS fills websites.defaultBaseUrl from baseUrl; the test asserting it is checking the derived value, not a second hand-written copy.
  • Icon wiring is complete. The SVG is a single currentColor path, registered in modelIcons and in monoIconUrls so it inverts in dark mode.
  • Tests and formatting. I ran the two touched suites in the PR worktree with this repo's dependencies: 87 tests pass, including both new cases. oxfmt --check is clean on all changed files.

Non-blocking notes:

  1. The models website field points at the pricing page. That is consistent with your description (the model list lives there), but it differs from peers such as yapi, which use a dedicated model page. Fine to keep.
  2. The README provider grid was not updated. CloudGPU and Runcrate did add rows; AtmoRouter, Y-API and apimodels did not, so this is not a requirement — just be aware the listing is discoverable in Settings but not on the README grid.
  3. Your PR body says the basicApiKeyProviders.test.ts case was never executed because the AI SDK stack was not installed. It does run — it is included in the 87 passing tests above, so that gap is closed.
  4. This is a self-submitted relay listing with the disclosure stated. The provider stays disabled by default and offers no embeddings endpoint, so nothing changes for existing users until they opt in.

I also approved the two action_required workflow runs (PR Check, Package Check) so CI can run; they were queued when this review was posted.

Review scope and evidence
  • Worktree: detached checkout of c83814af44081ec786163d3bdb45c40abf949fb2 (branch feat/provider-xxapi, base dev).
  • Diff scope: 6 files, +66/-0 — src/main/provider/defaults.ts, src/main/provider/providerRegistry.ts, src/renderer/src/assets/llm-icons/xxapi.svg, src/renderer/src/components/icons/modelIconRegistry.ts, test/main/provider/basicApiKeyProviders.test.ts, test/main/provider/defaultProviders.test.ts.
  • Comparisons: commit 28835548e (AtmoRouter, 6 files/+66), 9621a9354 (Runcrate, 9 files), c70f7f1f4 (CloudGPU, 11 files).
  • Commands: pnpm exec vitest run --config vitest.config.ts test/main/provider/defaultProviders.test.ts test/main/provider/basicApiKeyProviders.test.ts → 2 files, 87 tests passed; pnpm exec oxfmt --check <changed files> → clean.
  • Endpoint probes: https://xxapi.ai/v1/models → 401 without key (as described), https://xxapi.ai/ → 200, https://docs.xxapi.ai/getting-started → 200.

@zerob13
zerob13 merged commit 02fdea9 into ThinkInAIXYZ:dev Oct 29, 2026
12 checks passed
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.

2 participants