providers: GMI Cloud is a preset (aiandcloud on X)
aiandcloud asked for GMI Cloud. It is now a preset in Add: OpenAI chat completions at https://api.gmi-serving.com/v1, the key as Bearer, its model list read from /v1/models, the gmicloud icon the GUI already ships, and its console as the keys page. Only Chat is set: GMI's quickstart and LLM API reference (docs.gmicloud.ai) name no Responses or Messages endpoint. READMEs list it; the icon is copied to the site. Run: TestGMICloudPreset (preset fields, no Responses or Anthropic URL, an import at the host becomes the preset) and go test ./internal/provider -run 'Preset|Import|Icon' on Linux (wsl-run); gofmt; GOOS=windows go vet of internal/provider. No network in the test. Broken by hand: not run (without the preset FromPreset errors). Not tried: no GMI key, so no real chat call or model list; mote's disk is full, so no macOS run; no full suite before the tag.
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
+1
-1
@@ -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 和每个账号都可以走自己的代理。
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
@@ -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",
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>GmiCloud</title><path d="M15.55 5c.249 0 .45.225.45.5v2c0 .276-.202.5-.45.5h-3.1c-.25 0-.451.226-.451.5v2c0 .277-.203.5-.45.5h-3.1c-.25 0-.451.225-.451.5v2c0 .276.203.5.45.5h3.104c.25 0 .45.225.45.5v2c0 .277.203.5.45.5h3.1c.25 0 .451.225.451.5v2c0 .277-.203.5-.45.5h-7.1c-.25 0-.45-.225-.45-.5v-2c0-.276-.203-.5-.45-.5H4.451c-.25 0-.45-.225-.45-.5v-2c0-.277-.203-.5-.451-.5H.45C.2 14 0 13.775 0 13.5v-2c0-.277.203-.5.45-.5h3.098c.25 0 .45-.225.45-.5v-2c0-.276.203-.5.45-.5H7.55C7.8 8 8 7.775 8 7.5v-2c0-.277.203-.5.451-.5z"></path><path d="M23.55 11.002c.247 0 .45.223.45.5v2c0 .274-.201.5-.45.5h-3.1c-.249 0-.451.223-.451.5v2c0 .274-.202.5-.45.5h-3.101c-.248 0-.45-.224-.45-.5v-4.999c0-.275.2-.5.45-.5h7.1z"></path></svg>
|
||||
|
After Width: | Height: | Size: 886 B |
Reference in New Issue
Block a user