diff --git a/README.md b/README.md index adcf5549b..01f89cec6 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,7 @@ The cost: the model sees `{{API_KEY_…}}`, not the key, so a task about the val Pick a preset, paste a key. Model lists come from the vendor, with names and reasoning levels filled in from [models.dev](https://models.dev), so a model released this morning is in your picker on the next refresh. -> **Presets include** Anthropic · OpenAI · Google Gemini · Google Vertex AI · Amazon Bedrock (runtime and Mantle) · DeepSeek · Kimi · Zhipu GLM · MiniMax · StepFun · LongCat · Qwen · Baidu Qianfan · Tencent Cloud · Huawei Cloud MaaS · Volcengine Ark · Mistral · Voyage AI · Groq · Nous Portal · xAI · OpenRouter · Vercel AI Gateway · Together · Fireworks · Fireworks Nexus · SiliconFlow · NVIDIA NIM · ModelScope · Ollama · LM Studio … and any OpenAI- or Anthropic-compatible URL. +> **Presets include** Anthropic · OpenAI · Google Gemini · Google Vertex AI · Amazon Bedrock (runtime and Mantle) · DeepSeek · Kimi · Zhipu GLM · MiniMax · StepFun · LongCat · Qwen · Baidu Qianfan · Tencent Cloud · Huawei Cloud MaaS · Volcengine Ark · Mistral · Voyage AI · Groq · Nous Portal · xAI · OpenRouter · Vercel AI Gateway · GMI Cloud · Together · Fireworks · Fireworks Nexus · SiliconFlow · NVIDIA NIM · ModelScope · Ollama · LM Studio … and any OpenAI- or Anthropic-compatible URL. **Import** brings in the providers from CC Switch, Claude Code, Codex and Alma. **[Add to magpie](https://usemagpie.ai/docs/import)** links let a provider's website hand its config to magpie in one click. Each key and each account can go through a proxy of its own. diff --git a/README.zh-CN.md b/README.zh-CN.md index 707f0a966..bb3ff3bec 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -152,7 +152,7 @@ Agent 会把读到的东西放进提示词:一个 `.env`、一份配置、一 选一个预设,粘贴 key。模型列表直接来自厂商,名称和推理档位从 [models.dev](https://models.dev) 补全,今天早上刚发布的模型,下次刷新就出现在你的选择器里。 -> **预设包括** Anthropic · OpenAI · Google Gemini · Amazon Bedrock(runtime 与 Mantle)· DeepSeek · Kimi · 智谱 GLM · MiniMax · 阶跃星辰 · LongCat · 通义千问 · 百度千帆 · 腾讯云 · 华为云 MaaS · 火山方舟 · Mistral · Voyage AI · Groq · Nous Portal · xAI · OpenRouter · Vercel AI Gateway · Together · Fireworks · Fireworks Nexus · 硅基流动 · NVIDIA NIM · 魔搭 · Ollama · LM Studio …… 以及任何兼容 OpenAI 或 Anthropic 的地址。 +> **预设包括** Anthropic · OpenAI · Google Gemini · Amazon Bedrock(runtime 与 Mantle)· DeepSeek · Kimi · 智谱 GLM · MiniMax · 阶跃星辰 · LongCat · 通义千问 · 百度千帆 · 腾讯云 · 华为云 MaaS · 火山方舟 · Mistral · Voyage AI · Groq · Nous Portal · xAI · OpenRouter · Vercel AI Gateway · GMI Cloud · Together · Fireworks · Fireworks Nexus · 硅基流动 · NVIDIA NIM · 魔搭 · Ollama · LM Studio …… 以及任何兼容 OpenAI 或 Anthropic 的地址。 **导入**能读取你在 CC Switch、Claude Code、Codex 和 Alma 里配置的 provider。[**「添加到 magpie」链接**](https://usemagpie.ai/docs/zh/import)让 provider 网站一键把配置交给 magpie。每个 key 和每个账号都可以走自己的代理。 diff --git a/internal/provider/gmicloud_test.go b/internal/provider/gmicloud_test.go new file mode 100644 index 000000000..fa3c2584b --- /dev/null +++ b/internal/provider/gmicloud_test.go @@ -0,0 +1,26 @@ +package provider + +import "testing" + +// GMI Cloud is a preset (aiandcloud on X): its OpenAI-compatible endpoint +// at api.gmi-serving.com/v1, a key, and an entry imported at that address +// is the preset. +func TestGMICloudPreset(t *testing.T) { + p, err := FromPreset("gmicloud") + if err != nil { + t.Fatal(err) + } + if p.Name != "GMI Cloud" || p.Icon != "gmicloud" || p.Chat != "https://api.gmi-serving.com/v1" || p.KeysURL == "" { + t.Fatalf("%+v", p) + } + if p.Responses != "" || p.Anthropic != "" { + t.Fatalf("endpoints its docs don't name are set: %q %q", p.Responses, p.Anthropic) + } + if pr := Preset("gmicloud"); pr == nil || pr.Kind != KindRelay || pr.NoKey { + t.Fatalf("%+v", pr) + } + im, _ := imported("x", "k", endpoints{chat: "https://api.gmi-serving.com/v1/"}, nil) + if im.Preset != "gmicloud" { + t.Fatalf("imported: %+v", im) + } +} diff --git a/internal/provider/presets.go b/internal/provider/presets.go index 9719a116a..dc00cea50 100644 --- a/internal/provider/presets.go +++ b/internal/provider/presets.go @@ -556,6 +556,13 @@ var presets = []PresetDef{ {ID: "vercel", Name: "Vercel AI Gateway", Icon: "vercel", Kind: KindRelay, Catalog: "vercel", Chat: "https://ai-gateway.vercel.sh/v1", Responses: "https://ai-gateway.vercel.sh/v1", Anthropic: "https://ai-gateway.vercel.sh", Website: "https://vercel.com/docs/ai-gateway", KeysURL: "https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai-gateway%2Fapi-keys"}, + // GMI Cloud (aiandcloud on X): OpenAI-compatible chat completions at + // api.gmi-serving.com/v1, its model list at /v1/models, the key as Bearer + // (docs.gmicloud.ai quickstart and LLM API reference). Its docs name no + // Responses or Messages endpoint, so only Chat is set + {ID: "gmicloud", Name: "GMI Cloud", Icon: "gmicloud", Kind: KindRelay, + Chat: "https://api.gmi-serving.com/v1", + Website: "https://www.gmicloud.ai", KeysURL: "https://console.gmicloud.ai"}, {ID: "opencode-go", Name: "OpenCode Go", Icon: "opencode", Kind: KindRelay, Catalog: "opencode-go", Chat: "https://opencode.ai/zen/go/v1", Responses: "https://opencode.ai/zen/go/v1", Anthropic: "https://opencode.ai/zen/go", Note: "open coding models, $10/month", diff --git a/site/public/icons/gmicloud.svg b/site/public/icons/gmicloud.svg new file mode 100644 index 000000000..b743eb032 --- /dev/null +++ b/site/public/icons/gmicloud.svg @@ -0,0 +1 @@ +GmiCloud \ No newline at end of file