Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.jp.md
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,10 @@ DeepChatはメッセージアプリからリモート操作できるため、デ
<img src="./src/renderer/src/assets/llm-icons/runcrate.svg" width="50" height="50" alt="Runcrate Icon"><br/>
<a href="https://www.runcrate.ai/?utm_source=deepchat">Runcrate</a>
</td>
<td>
<img src="./src/renderer/src/assets/llm-icons/cloudgpu.svg" width="50" height="50" alt="CloudGPU Icon"><br/>
<a href="https://cloudgpu.app/?utm_source=deepchat">CloudGPU</a>
</td>
</tr>

</table>
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,10 @@ Common commands include `/start`, `/help`, `/pair`, `/new`, `/sessions`, `/use`,
<img src="./src/renderer/src/assets/llm-icons/runcrate.svg" width="50" height="50" alt="Runcrate Icon"><br/>
<a href="https://www.runcrate.ai/?utm_source=deepchat">Runcrate</a>
</td>
<td>
<img src="./src/renderer/src/assets/llm-icons/cloudgpu.svg" width="50" height="50" alt="CloudGPU Icon"><br/>
<a href="https://cloudgpu.app/?utm_source=deepchat">CloudGPU</a>
</td>
</tr>

</table>
Expand Down
4 changes: 4 additions & 0 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,10 @@ DeepChat 可以通过聊天软件远程控制,让你离开桌面后也能继
<img src="./src/renderer/src/assets/llm-icons/runcrate.svg" width="50" height="50" alt="Runcrate Icon"><br/>
<a href="https://www.runcrate.ai/?utm_source=deepchat">Runcrate</a>
</td>
<td>
<img src="./src/renderer/src/assets/llm-icons/cloudgpu.svg" width="50" height="50" alt="CloudGPU Icon"><br/>
<a href="https://cloudgpu.app/?utm_source=deepchat">CloudGPU</a>
</td>
</tr>

</table>
Expand Down
11 changes: 11 additions & 0 deletions docs/features/provider-runtime/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,17 @@ The catalog is public, so connection checks generate text with `gpt-5.6-luna` an

Upstream reference: [Language Models API](https://apimodels.app/docs/llm?p=openai).

## CloudGPU

`cloudgpu` uses the OpenAI-compatible transport with API-key credentials. Live model discovery
lists every chat model from the public `/v1/models` catalog. 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. The catalog is public, so connection checks generate text
with `deepseek-v4.1-flash` and the shared 16-token output limit to validate credentials.
Embeddings are disabled for this profile.

Upstream reference: [API docs](https://cloudgpu.app/api/docs?utm_source=deepchat).

## OpenAI Codex

`openai-codex` is separate from standard `openai`: distinct provider ID, runtime kind, credential store,
Expand Down
14 changes: 14 additions & 0 deletions src/main/provider/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,20 @@ const PROVIDER_DEFAULTS: LLM_PROVIDER_BASE[] = [
models: 'https://www.runcrate.ai/inference?utm_source=deepchat'
}
},
{
id: 'cloudgpu',
name: 'CloudGPU',
apiType: 'openai-completions',
apiKey: '',
baseUrl: 'https://cloudgpu.app/v1',
enable: false,
websites: {
official: 'https://cloudgpu.app/?utm_source=deepchat',
apiKey: 'https://cloudgpu.app/api/console?utm_source=deepchat',
docs: 'https://cloudgpu.app/api/docs?utm_source=deepchat',
models: 'https://cloudgpu.app/api?utm_source=deepchat'
}
},
{
id: 'aistupidlevel',
name: 'AI Stupid Level',
Expand Down
15 changes: 15 additions & 0 deletions src/main/provider/providerRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export type AiSdkModelSourceStrategy =
| 'openai'
| 'apimodels'
| 'runcrate'
| 'cloudgpu'
| 'apimart'
| 'openai-codex'
| 'opencode-go'
Expand Down Expand Up @@ -625,6 +626,20 @@ const PROVIDER_ID_REGISTRY = new Map<string, AiSdkProviderDefinition>([
checkMaxTokens: 16
})
],
[
'cloudgpu',
createDefinition({
...OPENAI_BASE,
modelSource: 'cloudgpu',
checkStrategy: 'generate-text',
credentialStrategy: 'api-key',
embeddingStrategy: 'none',
checkModelId: 'deepseek-v4.1-flash',
checkPrompt: 'Hello',
checkTemperature: 0.2,
checkMaxTokens: 16
})
],
[
'poe',
createDefinition({
Expand Down
42 changes: 42 additions & 0 deletions src/main/provider/providers/aiSdkProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1784,6 +1784,8 @@ export class AiSdkProvider extends BaseLLMProvider {
}
case 'runcrate':
return this.fetchRuncrateModels()
case 'cloudgpu':
return this.fetchCloudgpuModels()
case 'bedrock':
return this.fetchBedrockModels()
case 'new-api':
Expand Down Expand Up @@ -2180,6 +2182,46 @@ export class AiSdkProvider extends BaseLLMProvider {
return models
}

/**
* CloudGPU's public catalog answers without a key and has no capability field. List every id
* except the ones that are clearly not chat models (embedding, rerank, image, audio, speech).
*/
private async fetchCloudgpuModels(): Promise<MODEL_META[]> {
const records = await this.fetchOpenAIModelRecords({ timeout: this.getModelFetchTimeout() })
const nonChatPatterns = [
'embed',
'rerank',
'image',
'flux-',
'audio',
'speech',
'tts',
'whisper',
'-asr',
'transcri'
]
const models: MODEL_META[] = []
for (const model of records) {
const modelId = typeof model.id === 'string' ? model.id.trim() : ''
const lower = modelId.toLowerCase()
if (!modelId || nonChatPatterns.some((pattern) => lower.includes(pattern))) {
continue
}
models.push({
id: modelId,
name: modelId,
group: 'default',
providerId: this.provider.id,
isCustom: false,
type: ModelType.Chat,
...(typeof model.owned_by === 'string' && model.owned_by.trim()
? { ownedBy: model.owned_by.trim() }
: {})
})
}
return models
}

private async fetchBedrockModels(): Promise<MODEL_META[]> {
const provider = this.provider as AWS_BEDROCK_PROVIDER
const credential = provider.credential
Expand Down
5 changes: 5 additions & 0 deletions src/renderer/src/assets/llm-icons/cloudgpu.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/renderer/src/components/icons/modelIconRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import litellmColorIcon from '@/assets/llm-icons/litellm.svg?url'
import opperColorIcon from '@/assets/llm-icons/opper.svg?url'
import aistupidlevelIcon from '@/assets/llm-icons/aistupidlevel.svg?url'
import runcrateIcon from '@/assets/llm-icons/runcrate.svg?url'
import cloudgpuIcon from '@/assets/llm-icons/cloudgpu.svg?url'
import demonrouteColorIcon from '@/assets/llm-icons/demonroute.svg?url'
import orcarouterColorIcon from '@/assets/llm-icons/orcarouter.svg?url'
import synthoraiColorIcon from '@/assets/llm-icons/synthorai.svg?url'
Expand Down Expand Up @@ -202,6 +203,7 @@ export const modelIcons = {
opper: opperColorIcon,
aistupidlevel: aistupidlevelIcon,
runcrate: runcrateIcon,
cloudgpu: cloudgpuIcon,
demonroute: demonrouteColorIcon,
orcarouter: orcarouterColorIcon,
synthorai: synthoraiColorIcon,
Expand Down Expand Up @@ -285,6 +287,7 @@ const monoIconUrls = new Set<string>([
opperColorIcon,
aistupidlevelIcon,
runcrateIcon,
cloudgpuIcon,
demonrouteColorIcon,
githubColorIcon,
qiniuIcon,
Expand Down
87 changes: 87 additions & 0 deletions test/main/provider/basicApiKeyProviders.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1722,6 +1722,93 @@ describe('basic API-key provider registrations', () => {
)
})

it('checks CloudGPU with a chat model instead of its public model list', async () => {
const defaults = DEFAULT_PROVIDERS.find((provider) => provider.id === 'cloudgpu')!
expect(defaults).toBeDefined()
const config = { ...defaults, apiKey: 'test-key' }
// CloudGPU's /v1/models answers without a key, so listing models cannot validate one.
expect(resolveAiSdkProviderDefinition(config)).toMatchObject({
runtimeKind: 'openai-compatible',
modelSource: 'cloudgpu',
checkStrategy: 'generate-text',
credentialStrategy: 'api-key',
embeddingStrategy: 'none',
checkModelId: 'deepseek-v4.1-flash'
})
const provider = new AiSdkProvider(config, createProviderSettings())
;(provider as any).isInitialized = true

await expect(provider.check()).resolves.toEqual({ isOk: true, errorMsg: null })
expect(mockRunAiSdkGenerateText).toHaveBeenCalledWith(
expect.objectContaining({
providerKind: 'openai-compatible',
provider: expect.objectContaining({
id: 'cloudgpu',
apiKey: 'test-key',
baseUrl: 'https://cloudgpu.app/v1'
})
}),
[{ role: 'user', content: 'Hello' }],
'deepseek-v4.1-flash',
expect.any(Object),
0.2,
16
)
})

it('lists every CloudGPU catalog id except non-chat models', async () => {
const defaults = DEFAULT_PROVIDERS.find(({ id }) => id === 'cloudgpu')!
const fetchMock = vi.fn().mockResolvedValue(
Response.json({
object: 'list',
data: [
{ id: 'auto', owned_by: 'cloudgpu' },
{ id: 'deepseek-v4.1-flash', owned_by: 'cloudgpu' },
{ id: 'kimi-k3', owned_by: 'cloudgpu' },
{ id: 'glm-5.1', owned_by: ' ' },
{ id: 'minimax-m3' },
{ id: 'vendor-chat-large' },
{ id: 'flux-1-schnell' },
{ id: 'glm-image' },
{ id: 'deepseek-embed' },
{ id: 'vendor-reranker' },
{ id: 'whisper-v3' },
{ id: 'kokoro-tts' },
{ id: 'vendor-asr' },
{ id: 'vendor-audio-preview' },
{ id: ' ' },
{ id: 12 }
]
})
)
global.fetch = fetchMock
const provider = new AiSdkProvider(defaults, createProviderSettings())

const models = await provider.fetchModels({ suppressErrors: false })
expect(models.map(({ id }) => id)).toEqual([
'auto',
'deepseek-v4.1-flash',
'kimi-k3',
'glm-5.1',
'minimax-m3',
'vendor-chat-large'
])
expect(models).toContainEqual({
id: 'auto',
name: 'auto',
group: 'default',
providerId: 'cloudgpu',
isCustom: false,
type: 'chat',
ownedBy: 'cloudgpu'
})
expect(models.find(({ id }) => id === 'glm-5.1')).not.toHaveProperty('ownedBy')
expect(fetchMock).toHaveBeenCalledWith(
'https://cloudgpu.app/v1/models',
expect.objectContaining({ method: 'GET' })
)
})

it('lists only text chat models from the public Runcrate catalog', async () => {
const defaults = DEFAULT_PROVIDERS.find(({ id }) => id === 'runcrate')!
const fetchMock = vi.fn().mockResolvedValue(
Expand Down
19 changes: 19 additions & 0 deletions test/main/provider/defaultProviders.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,25 @@ describe('DEFAULT_PROVIDERS', () => {
)
})

it('includes CloudGPU as a disabled built-in OpenAI-compatible provider', () => {
expect(DEFAULT_PROVIDERS).toContainEqual(
expect.objectContaining({
id: 'cloudgpu',
name: 'CloudGPU',
apiType: 'openai-completions',
baseUrl: 'https://cloudgpu.app/v1',
enable: false,
websites: expect.objectContaining({
official: 'https://cloudgpu.app/?utm_source=deepchat',
apiKey: 'https://cloudgpu.app/api/console?utm_source=deepchat',
docs: 'https://cloudgpu.app/api/docs?utm_source=deepchat',
models: 'https://cloudgpu.app/api?utm_source=deepchat',
defaultBaseUrl: 'https://cloudgpu.app/v1'
})
})
)
})

it('includes AI Stupid Level as a disabled built-in OpenAI-compatible provider', () => {
expect(DEFAULT_PROVIDERS).toContainEqual(
expect.objectContaining({
Expand Down