feat(providers): add CloudGPU as an OpenAI-compatible gateway

Register the CloudGPU provider spec, settings and runtime tests, and the official site icon.

Co-authored-by: CloudGPU <mrhy7176@users.noreply.github.com>
This commit is contained in:
Cursor Agent
2026-10-29 00:12:41 +00:00
parent 18aaa11697
commit 85f5d1c308
7 changed files with 81 additions and 0 deletions

View File

@@ -373,6 +373,16 @@ PROVIDERS: tuple[ProviderSpec, ...] = (
detect_by_base_keyword="runcrate",
default_api_base="https://api.runcrate.ai/v1",
),
ProviderSpec(
name="cloudgpu",
keywords=("cloudgpu",),
env_key="CLOUDGPU_API_KEY",
display_name="CloudGPU",
backend="openai_compat",
is_gateway=True,
detect_by_base_keyword="cloudgpu",
default_api_base="https://cloudgpu.app/v1",
),
ProviderSpec(
name="volcengine",
keywords=("volcengine", "volces", "ark"),

View File

@@ -726,6 +726,13 @@ def test_llm_provider_choices_include_runcrate() -> None:
assert llm["runcrate"]["base_url"] == "https://api.runcrate.ai/v1"
def test_llm_provider_choices_include_cloudgpu() -> None:
llm = {item["value"]: item for item in settings_router._provider_choices()["llm"]}
assert llm["cloudgpu"]["label"] == "CloudGPU"
assert llm["cloudgpu"]["base_url"] == "https://cloudgpu.app/v1"
def test_llm_provider_choices_include_novita() -> None:
llm = {item["value"]: item for item in settings_router._provider_choices()["llm"]}

View File

@@ -601,6 +601,7 @@ def test_registered_cloud_openai_compat_providers_enable_native_tools() -> None:
"y_api",
"onomeo",
"runcrate",
"cloudgpu",
"edenai",
"novita",
"volcengine_coding_plan",

View File

@@ -608,6 +608,63 @@ def test_llm_runcrate_base_url_detection_preserves_openai_binding_compatibility(
assert resolved.effective_url == "https://api.runcrate.ai/v1"
def test_llm_cloudgpu_binding_uses_default_openai_compatible_endpoint() -> None:
catalog = _build_catalog(
llm_profile={
"id": "llm-p",
"name": "CloudGPU",
"binding": "cloudgpu",
"base_url": "",
"api_key": "cloudgpu-key",
"api_version": "",
"extra_headers": {},
"models": [
{
"id": "llm-m",
"name": "DeepSeek V4.1 Flash",
"model": "deepseek-v4.1-flash",
}
],
}
)
resolved = resolve_llm_runtime_config(catalog=catalog)
assert resolved.provider_name == "cloudgpu"
assert resolved.provider_mode == "gateway"
assert resolved.binding == "cloudgpu"
assert resolved.model == "deepseek-v4.1-flash"
assert resolved.api_key == "cloudgpu-key"
assert resolved.effective_url == "https://cloudgpu.app/v1"
def test_llm_cloudgpu_base_url_detection_preserves_openai_binding_compatibility() -> None:
catalog = _build_catalog(
llm_profile={
"id": "llm-p",
"name": "OpenAI Compatible",
"binding": "openai",
"base_url": "https://cloudgpu.app/v1",
"api_key": "cloudgpu-key",
"api_version": "",
"extra_headers": {},
"models": [
{
"id": "llm-m",
"name": "DeepSeek V4.1 Flash",
"model": "deepseek-v4.1-flash",
}
],
}
)
resolved = resolve_llm_runtime_config(catalog=catalog)
assert resolved.provider_name == "cloudgpu"
assert resolved.provider_mode == "gateway"
assert resolved.effective_url == "https://cloudgpu.app/v1"
def test_llm_novita_binding_uses_default_openai_compatible_endpoint() -> None:
catalog = _build_catalog(
llm_profile={

View File

@@ -16,6 +16,7 @@ export const PROVIDER_ICONS: Readonly<Record<string, ProviderIconSpec>> = {
byteplus_coding_plan: { file: "byteplus.png" },
cheaperinference: { file: "cheaperinference.svg" },
claude_code: { file: "anthropic.svg", mono: true },
cloudgpu: { file: "cloudgpu.png" },
codebuddy: { file: "codebuddy-official.svg" },
cohere: { file: "cohere-color.svg" },
dashscope: { file: "bailian-color.svg" },

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -108,6 +108,11 @@
"sha256": "a5ab289455324590b5e0cb2836e92f7b16fee59ee0d4fe417cbbabdeb534d7fb",
"source": "Official website asset"
},
"cloudgpu.png": {
"url": "https://cloudgpu.app/apple-icon.png?c033c6c14af57cef",
"sha256": "8051137fee486b2a36a7f6744cf86fb48ac17520d5ee8dd712c659feb8adb912",
"source": "Official website asset"
},
"api-route.png": {
"url": "https://www.api-route.com/apple-touch-icon.png?v=2",
"sha256": "28866bf8b7c0913c634a34d2839a3201b0eab2019b926e556411a72f4c969e42",