Skip to content

feat(provider): add CloudGPU - #2474

Merged
zerob13 merged 2 commits into
ThinkInAIXYZ:devfrom
mrhy7176:feat/provider-cloudgpu
Oct 28, 2026
Merged

zerob13 merged 2 commits into
ThinkInAIXYZ:devfrom
mrhy7176:feat/provider-cloudgpu

Conversation

@mrhy7176

@mrhy7176 mrhy7176 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Adds CloudGPU as a disabled built-in OpenAI-compatible provider, in the same registry shape as Runcrate (#2468) and the other API-key providers.

CloudGPU serves chat models behind an OpenAI-compatible API, and also rents GPUs.

  • defaults.ts: cloudgpu, base URL https://cloudgpu.app/v1, disabled by default, keys at https://cloudgpu.app/api/console?utm_source=deepchat. Every CloudGPU link carries only utm_source=deepchat, like Runcrate. The docs quick start points at that API console for key creation. The model link is the browsable catalog page, not the JSON endpoint.
  • providerRegistry.ts: ...OPENAI_BASE with modelSource: 'cloudgpu', checkStrategy: 'generate-text' and embeddingStrategy: 'none', like Runcrate. CloudGPU's GET /v1/models answers without a key, so the fetch-models check would accept any key; a short chat call does reject a bad one. Embeddings stay off; the API docs say they are not available.
  • aiSdkProvider.ts: a cloudgpu model source, following runcrate. It lists the chat models from CloudGPU's public /v1/models endpoint. The catalog has no capability field, so ids that are clearly not chat models (embedding, rerank, image, audio, speech, TTS and transcription ids) are skipped by name; everything else shows up in the chat picker.
  • Icon: the CloudGPU mark, registered with the other mono icons.
  • README grids: CloudGPU next to Runcrate.
  • docs/features/provider-runtime/spec.md: the same contract, next to the apimodels profile.
  • Tests: a defaults case, a check case that pins the generate-text check, and a catalog case that feeds chat ids plus non-chat ids and expects only the chat ids.

Validation (on current dev, Node 24.22.1, pnpm 10.34.5):

  • pnpm exec vitest run --config vitest.config.ts test/main/provider/defaultProviders.test.ts test/main/provider/basicApiKeyProviders.test.ts: 83 passed
  • pnpm exec vitest run --config vitest.config.ts test/main/provider: 75 files, 1042 passed
  • pnpm run typecheck: clean (typecheck:node and typecheck:web)
  • pnpm run lint: clean
  • oxfmt --check on the touched source files: clean

This PR was prepared with AI assistance (an AI coding agent wrote the change and ran the checks above).

Disclosure: I work on CloudGPU.

Summary by CodeRabbit

  • New Features
    • Added CloudGPU as a supported model provider, disabled by default. Configure it with an API key to discover and use compatible chat models.
    • Added CloudGPU’s icon and links to its website, API console, and documentation.
  • Documentation
    • Updated provider listings and runtime documentation with CloudGPU setup and model support details.

Register a disabled OpenAI-compatible provider for the CloudGPU chat API.

Co-authored-by: CloudGPU <mrhy7176@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Oct 27, 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: ef998152-f412-408b-bc24-45c46316fd8e
Commits

Reviewing files that changed from the base of the PR and between c70f7f1 and 80efc7c.

Files selected for processing: 3
  • docs/features/provider-runtime/spec.md
  • src/main/provider/providers/aiSdkProvider.ts
  • test/main/provider/basicApiKeyProviders.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

CloudGPU is added as a disabled OpenAI-compatible provider. It uses API-key credentials, text-generation connection checks, and filtered model discovery. Its icon and provider-list entries are added to the English, Japanese, and Chinese READMEs.

Changes: CloudGPU provider

Layer / File(s) Summary
Provider configuration and runtime contract
docs/features/provider-runtime/spec.md, src/main/provider/defaults.ts, src/main/provider/providerRegistry.ts, test/main/provider/defaultProviders.test.ts
Defines CloudGPU’s OpenAI-compatible settings, API-key credentials, text-generation check, and disabled embeddings. The provider contract and default-provider test cover these settings.
Model discovery and credential checks
src/main/provider/providers/aiSdkProvider.ts, test/main/provider/basicApiKeyProviders.test.ts
Fetches the CloudGPU model catalog and returns nonempty IDs after excluding IDs that indicate embedding, rerank, image, audio, speech, TTS, Whisper, ASR, or transcription models. Tests cover discovery, ownership metadata, and text-generation credential checks.
Provider listings and icon
src/renderer/src/components/icons/modelIconRegistry.ts, README.md, README.jp.md, README.zh.md
Registers the CloudGPU icon and adds CloudGPU to the provider lists in all three README files.

Priority: Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Suggested reviewers: zerob13

Merge Risk: Minimal · up to 80efc

CloudGPU is added disabled by default. No concrete merge-blocking risk remains.

Pre-merge checks: Passed 4
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely identifies the main change: adding CloudGPU as a provider.
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.
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: request changes

This PR adds CloudGPU as a disabled built-in OpenAI-compatible provider. The profile shape, icon registration, docs and tests follow the existing Runcrate/APIMODELS pattern, and all required CI checks pass. The remaining issue is the model catalog scope.

Blocking

1. Model discovery hides most of CloudGPU's catalog

fetchCloudgpuModels keeps only IDs starting with deepseek-, kimi-, glm- or minimax-. CloudGPU's public GET https://cloudgpu.app/v1/models currently returns 43 entries, including 10 Claude models, 6 GPT models, 7 Qwen models and the auto routing model. CloudGPU's own docs describe one OpenAI-compatible endpoint for Claude, DeepSeek, GLM, Kimi, MiniMax and more.

As written, a user who configures the built-in CloudGPU provider sees 11 of 43 models. Claude, GPT, Qwen and auto will not appear in the model picker unless they are added manually. That is inconsistent with the other aggregator profiles in this codebase: APIMODELS filters by modality: 'chat', and Runcrate filters by text-in/text-out capability. Both surface everything the catalog actually serves.

The prefix allowlist also misclassifies future entries: a glm-image or deepseek-embed ID would be treated as a chat model because it matches a family prefix.

Please either:

  • include every chat family and exclude only the known non-chat IDs (flux-, whisper-, kokoro-, qwen3-asr), or use a capability field if CloudGPU can expose one; or
  • if the four-family subset is a deliberate product decision, state the real constraint in the spec and PR body. The current comment, "lists more than the chat families this provider surfaces", only restates the filter. Explain why Claude/GPT/Qwen and auto are excluded.

2. PR body and spec describe the scope incorrectly

The PR says CloudGPU "serves DeepSeek, Kimi, GLM and MiniMax models behind an OpenAI-compatible API". That is incomplete: the service also serves Claude, GPT and Qwen through the same endpoint. The new section in docs/features/provider-runtime/spec.md repeats the four-family list without saying it is a deliberate subset. Update the text to match the final code, or change the code to match the text.

Minor notes (not blocking)

  • The catalog test asserts four complete model objects. It passes, but asserting the IDs plus one representative object would survive added fields with less churn. The existing Runcrate test uses the same style, so this is optional.
  • The last README row now has six cells while the preceding row has four. It renders, but the grid is uneven.
  • The catalog returns per-model prices and descriptions; the mapping keeps only ownedBy. Not required for this provider, just noting the unused metadata.

Validation

  • CI: pr-required, static, build, test-main, test-renderer, test-native-memory and package-required all pass.
  • Locally ran test/main/provider/defaultProviders.test.ts and test/main/provider/basicApiKeyProviders.test.ts: 83 tests passed.
  • Verified https://cloudgpu.app/v1/models on 2026-10-28; the family counts above come from that response. Verified the base URL, API console, docs and model-page links return 200.

Drop the model-family prefix allowlist. CloudGPU's /v1/models has no
capability field, so skip only ids that are clearly not chat models
(embedding, rerank, image, audio, speech, TTS, transcription).
@mrhy7176

Copy link
Copy Markdown
Contributor Author

@zerob13 Thanks for the review. In 80efc7c the prefix filter is removed: the provider now shows all chat models from CloudGPU's /v1/models, skipping only ids that are clearly not chat models (embedding, rerank, image, audio, speech, TTS, transcription), since the catalog has no capability field. The spec, test and PR body are updated to match.

@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

The previous blocking issue is fixed. fetchCloudgpuModels no longer restricts the picker to four families: it now keeps every catalog entry except ids that are clearly not chat models, and the spec, PR description and tests match that behavior.

What I checked

  • Model scope. The live GET https://cloudgpu.app/v1/models returns 43 ids. The new filter keeps 34 of them (Claude, GPT, DeepSeek, Qwen, Kimi, GLM, MiniMax, auto) and drops 9 non-chat ids: 4 flux-*, 2 whisper-*, 2 *-tts, 1 qwen3-asr. No chat model in the current catalog is lost.
  • Docs. The new docs/features/provider-runtime/spec.md section now describes the real filter and the reason it is name-based. The PR body says the same thing.
  • Tests. The catalog test now checks the returned ids plus one full object, which is less brittle than asserting four complete objects. The connection-check test follows the existing Runcrate case.
  • Provider wiring. Defaults, registry, icon registration and README entries follow the Runcrate pattern. The icon matches the mark served by https://cloudgpu.app/icon.svg.
  • CI. I approved the first-time-contributor workflows; pr-required, build, static, test-main, test-renderer, test-native-memory and package-required all pass on 80efc7c2.

Minor notes (not blocking)

  • The filter is a name blocklist. A future non-chat category that does not contain one of these substrings (video, moderation, realtime audio) would appear in the chat picker. Worth revisiting if CloudGPU expands its catalog.
  • -asr only matches ids where asr follows a hyphen. An asr-* id would pass.
  • The README table row containing CloudGPU now has six cells while the surrounding rows have four. It renders, but the grid is uneven.

Verification details

  • pnpm exec vitest run --config vitest.config.ts test/main/provider/defaultProviders.test.ts test/main/provider/basicApiKeyProviders.test.ts: 83 tests passed.
  • Checked https://cloudgpu.app/v1/models, /api/console, /api/docs and /api return 200 on 2026-10-28.
  • Reviewed the full diff from 830745fec to 80efc7c2: 11 files, all provider registration, discovery, docs, icon and tests.

@zerob13
zerob13 merged commit f858ffc into ThinkInAIXYZ:dev Oct 28, 2026
12 checks passed
@mrhy7176

Copy link
Copy Markdown
Contributor Author

Thanks @zerob13 and @duskzhen for the review and merge! If anyone hits issues with the CloudGPU provider, feel free to ping me here. (I work on CloudGPU.)

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