provider: Nous Portal is a vendor preset, Nous Research's API with a Portal key (#392, Vocllum, laojianzi)
Nous Research makes the Hermes models and serves them, with other makers' models, through Nous Portal. #392 was wrongly answered as a relay. A new preset, nous ("Nous Portal", KindVendor with Hosts, lobe-icons nousresearch icon), points chat completions at https://inference-api.nousresearch.com/v1. A Portal API key goes in as a Bearer, the way Hermes Agent's own nous-api provider uses NOUS_API_KEY. The model list is the Portal's /v1/models, which uses vendor/model ids. An entry another app has at that URL, such as Hermes Agent's base_url, now imports as the preset. The preset sets no Anthropic endpoint. The Portal's /v1/messages serves only its anthropic/* models (Hermes Agent's test_nous_portal_anthropic_wire.py), so Claude Code's requests are translated to chat completions for every model. It sets no Responses endpoint either, because none is documented. The preset is added to the README (en, zh), docs/reference.md, and the site's import pages and icon. Sources: - hermes-agent docs: integrations/nous-portal, integrations/providers, features/subscription-proxy. - hermes-agent source at 6e7b83a2: hermes_cli/auth_constants.py (DEFAULT_NOUS_INFERENCE_URL), plugins/model-providers/nous, cli-config.yaml.example ("nous-api - Nous Portal API key (requires: NOUS_API_KEY)"), agent/anthropic_endpoints.py, and tests/e2e/core/live/_helpers.py, whose live run calls the Portal with NOUS_API_KEY. Probed without a key: - /v1/models answers 200 with 423 models. - /v1/chat/completions with a bad Bearer answers 401 "Your API key is invalid, blocked or out of funds". - /v1/messages answers an Anthropic-shaped 401. Not tried: a real Portal key or a real request, since no key was available. Also not built: OAuth sign-in with the 1-hour token and its refresh (Hermes Agent's ~/.hermes/auth.json). Run: - TestNousPortalPreset fails without the preset (no preset "nous") and with an Anthropic endpoint added (endpoints: … "https://inference-api.nousresearch.com"). - go test -tags nogui of internal/provider, internal/gui and internal/catalog passes. - gofmt -l is clean. - go vet, GOOS=linux go vet and GOOS=windows go vet -tags nogui on ./internal/provider pass. - add-sheet and add-button GUI tests pass in Chromium and WebKit (6/6).
This commit is contained in:
@@ -125,7 +125,7 @@ Click a value and a searchable list opens: every model of every provider you add
|
||||
|
||||
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 · DeepSeek · Kimi · Zhipu GLM · MiniMax · StepFun · Qwen · Baidu Qianfan · Tencent Cloud · Huawei Cloud MaaS · Volcengine Ark · Mistral · Groq · xAI · OpenRouter · Together · Fireworks · SiliconFlow · NVIDIA NIM · ModelScope · Ollama · LM Studio … and any OpenAI- or Anthropic-compatible URL.
|
||||
> **Presets include** Anthropic · OpenAI · Google Gemini · Google Vertex AI · DeepSeek · Kimi · Zhipu GLM · MiniMax · StepFun · Qwen · Baidu Qianfan · Tencent Cloud · Huawei Cloud MaaS · Volcengine Ark · Mistral · Groq · Nous Portal · xAI · OpenRouter · Together · Fireworks · 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
@@ -125,7 +125,7 @@ export GOOGLE_GEMINI_BASE_URL=http://127.0.0.1:3425 GEMINI_API_KEY=magpie
|
||||
|
||||
选一个预设,粘贴 key。模型列表直接来自厂商,名称和推理档位从 [models.dev](https://models.dev) 补全,今天早上刚发布的模型,下次刷新就出现在你的选择器里。
|
||||
|
||||
> **预设包括** Anthropic · OpenAI · Google Gemini · DeepSeek · Kimi · 智谱 GLM · MiniMax · 阶跃星辰 · 通义千问 · 百度千帆 · 腾讯云 · 华为云 MaaS · 火山方舟 · Mistral · Groq · xAI · OpenRouter · Together · Fireworks · 硅基流动 · NVIDIA NIM · 魔搭 · Ollama · LM Studio …… 以及任何兼容 OpenAI 或 Anthropic 的地址。
|
||||
> **预设包括** Anthropic · OpenAI · Google Gemini · DeepSeek · Kimi · 智谱 GLM · MiniMax · 阶跃星辰 · 通义千问 · 百度千帆 · 腾讯云 · 华为云 MaaS · 火山方舟 · Mistral · Groq · Nous Portal · xAI · OpenRouter · Together · Fireworks · 硅基流动 · NVIDIA NIM · 魔搭 · Ollama · LM Studio …… 以及任何兼容 OpenAI 或 Anthropic 的地址。
|
||||
|
||||
**导入**能读取你在 CC Switch、Claude Code、Codex 和 Alma 里配置的 provider。[**「添加到 magpie」链接**](https://usemagpie.ai/docs/zh/import)让 provider 网站一键把配置交给 magpie。每个 key 和每个账号都可以走自己的代理。
|
||||
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ line; agents connected to magpie lose it when it quits.
|
||||
paste.
|
||||
- **Providers with one field.** Pick a preset (Anthropic, OpenAI, Gemini,
|
||||
DeepSeek, Kimi, GLM, MiniMax, StepFun, Qwen, Baidu Qianfan, Tencent Cloud Token Plan,
|
||||
Huawei Cloud MaaS, Volcengine Ark, Mistral, Groq, xAI, OpenRouter, Together,
|
||||
Huawei Cloud MaaS, Volcengine Ark, Mistral, Groq, Nous Portal, xAI, OpenRouter, Together,
|
||||
Fireworks, SiliconFlow, NVIDIA NIM, ModelScope, AiHubMix, PipeLLM, 302.AI, Ollama, LM Studio…),
|
||||
paste a key, done. Custom vendors need a name and a base URL. magpie never
|
||||
reads keys from your shell environment.
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package provider
|
||||
|
||||
import "testing"
|
||||
|
||||
// Nous Portal (#392) is a vendor preset at its OpenAI-compatible inference
|
||||
// API, chat completions only: its /v1/messages serves just the anthropic/*
|
||||
// models, so it is no Anthropic endpoint for Claude Code's other picks.
|
||||
func TestNousPortalPreset(t *testing.T) {
|
||||
p, err := FromPreset("nous")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if p.Chat != "https://inference-api.nousresearch.com/v1" || p.Responses != "" || p.Anthropic != "" {
|
||||
t.Fatalf("endpoints: %q %q %q", p.Chat, p.Responses, p.Anthropic)
|
||||
}
|
||||
if p.Name != "Nous Portal" || p.Icon != "nousresearch" || p.KeysURL != "https://portal.nousresearch.com" {
|
||||
t.Fatalf("preset: %+v", p)
|
||||
}
|
||||
pr := Preset("nous")
|
||||
if pr.Kind != KindVendor || !pr.Hosts || pr.NoKey {
|
||||
t.Fatalf("kind %q hosts %v noKey %v", pr.Kind, pr.Hosts, pr.NoKey)
|
||||
}
|
||||
// an entry another app has at the Portal (Hermes Agent's base_url) is the preset
|
||||
im, why := imported("Nous", "k", endpoints{chat: "https://inference-api.nousresearch.com/v1/"}, nil)
|
||||
if why != "" || im.Preset != "nous" || im.Icon != "nousresearch" || im.Anthropic != "" {
|
||||
t.Fatalf("imported: %q %+v", why, im)
|
||||
}
|
||||
}
|
||||
@@ -403,6 +403,17 @@ var presets = []PresetDef{
|
||||
Chat: "https://ollama.com/v1", Anthropic: "https://ollama.com",
|
||||
Note: "cloud models, with an API key",
|
||||
Website: "https://docs.ollama.com/cloud", KeysURL: "https://ollama.com/settings/keys"},
|
||||
// Nous Research's Nous Portal (#392): its own Hermes models and other
|
||||
// makers', at inference-api.nousresearch.com/v1, OpenAI's chat
|
||||
// completions with a Portal API key as a Bearer (Hermes Agent's
|
||||
// nous-api provider, NOUS_API_KEY). Its /v1/messages serves only the
|
||||
// anthropic/* models, so Claude Code's requests are translated to chat
|
||||
// completions for every model. Model ids are vendor/model, as its
|
||||
// /v1/models lists them.
|
||||
{ID: "nous", Name: "Nous Portal", Icon: "nousresearch", Kind: KindVendor, Hosts: true,
|
||||
Chat: "https://inference-api.nousresearch.com/v1",
|
||||
Note: "Nous Research · Hermes and other models",
|
||||
Website: "https://portal.nousresearch.com", KeysURL: "https://portal.nousresearch.com"},
|
||||
|
||||
{ID: "openrouter", Name: "OpenRouter", Icon: "openrouter", Kind: KindRelay, Catalog: "openrouter",
|
||||
Chat: "https://openrouter.ai/api/v1", Anthropic: "https://openrouter.ai/api",
|
||||
|
||||
@@ -292,7 +292,7 @@ href = <span class="s">"https://usemagpie.ai/import#"</span> + urlencode({
|
||||
["zai", "Z.ai"], ["minimax", "MiniMax"], ["minimax-cn", "MiniMax (China)"], ["stepfun", "StepFun"], ["stepfun-cn", "StepFun (China)"],
|
||||
["xiaomi", "Xiaomi MiMo"], ["baidu-qianfan", "Baidu Qianfan"], ["tencent-cloud", "Tencent Cloud"],
|
||||
["huaweicloud", "Huawei Cloud MaaS"], ["volcengine", "Volcengine Ark"], ["qwen", "Qwen"], ["qwen-cn", "Qwen (China)"], ["qwen-token-plan", "Qwen Token Plan"], ["bailian-token-plan", "Bailian Token Plan"],
|
||||
["mistral", "Mistral"], ["groq", "Groq"], ["bedrock", "Amazon Bedrock"], ["ollama-cloud", "Ollama Cloud"], ["openrouter", "OpenRouter"],
|
||||
["mistral", "Mistral"], ["groq", "Groq"], ["bedrock", "Amazon Bedrock"], ["ollama-cloud", "Ollama Cloud"], ["nous", "Nous Portal"], ["openrouter", "OpenRouter"],
|
||||
["opencode-go", "OpenCode Go"], ["clinepass", "ClinePass"], ["opencode-zen", "OpenCode Zen"], ["kilo", "Kilo Gateway"], ["commandcode", "Command Code"],
|
||||
["together", "Together AI"], ["fireworks", "Fireworks"], ["siliconflow", "SiliconFlow"], ["nvidia", "NVIDIA NIM"], ["modelscope", "ModelScope"],
|
||||
["aihubmix", "AiHubMix"], ["pipellm", "PipeLLM"], ["302ai", "302.AI"], ["cherryin", "CherryIN"], ["yylx", "鱼鱼连线"],
|
||||
|
||||
@@ -292,7 +292,7 @@ href = <span class="s">"https://usemagpie.ai/import#"</span> + urlencode({
|
||||
["zai", "Z.ai"], ["minimax", "MiniMax"], ["minimax-cn", "MiniMax(中国)"], ["stepfun", "StepFun"], ["stepfun-cn", "StepFun(中国)"],
|
||||
["xiaomi", "Xiaomi MiMo"], ["baidu-qianfan", "Baidu Qianfan"], ["tencent-cloud", "Tencent Cloud"],
|
||||
["huaweicloud", "Huawei Cloud MaaS"], ["volcengine", "Volcengine Ark"], ["qwen", "Qwen"], ["qwen-cn", "Qwen(中国)"], ["qwen-token-plan", "Qwen Token Plan"], ["bailian-token-plan", "Alibaba Cloud Bailian Token Plan"],
|
||||
["mistral", "Mistral"], ["groq", "Groq"], ["bedrock", "Amazon Bedrock"], ["ollama-cloud", "Ollama Cloud"], ["openrouter", "OpenRouter"],
|
||||
["mistral", "Mistral"], ["groq", "Groq"], ["bedrock", "Amazon Bedrock"], ["ollama-cloud", "Ollama Cloud"], ["nous", "Nous Portal"], ["openrouter", "OpenRouter"],
|
||||
["opencode-go", "OpenCode Go"], ["clinepass", "ClinePass"], ["opencode-zen", "OpenCode Zen"], ["kilo", "Kilo Gateway"], ["commandcode", "Command Code"],
|
||||
["together", "Together AI"], ["fireworks", "Fireworks"], ["siliconflow", "SiliconFlow"], ["nvidia", "NVIDIA NIM"], ["modelscope", "ModelScope"],
|
||||
["aihubmix", "AiHubMix"], ["pipellm", "PipeLLM"], ["302ai", "302.AI"], ["cherryin", "CherryIN"], ["yylx", "鱼鱼连线"],
|
||||
|
||||
@@ -292,7 +292,7 @@ href = <span class="s">"https://usemagpie.ai/import#"</span> + urlencode({
|
||||
["zai", "Z.ai"], ["minimax", "MiniMax"], ["minimax-cn", "MiniMax(中国)"], ["stepfun", "阶跃星辰"], ["stepfun-cn", "阶跃星辰(中国)"],
|
||||
["xiaomi", "小米 MiMo"], ["baidu-qianfan", "百度千帆"], ["tencent-cloud", "腾讯云"],
|
||||
["huaweicloud", "华为云 MaaS"], ["volcengine", "火山方舟"], ["qwen", "通义千问"], ["qwen-cn", "通义千问(中国)"], ["qwen-token-plan", "通义千问 Token Plan"], ["bailian-token-plan", "阿里云百炼 Token Plan"],
|
||||
["mistral", "Mistral"], ["groq", "Groq"], ["bedrock", "Amazon Bedrock"], ["ollama-cloud", "Ollama Cloud"], ["openrouter", "OpenRouter"],
|
||||
["mistral", "Mistral"], ["groq", "Groq"], ["bedrock", "Amazon Bedrock"], ["ollama-cloud", "Ollama Cloud"], ["nous", "Nous Portal"], ["openrouter", "OpenRouter"],
|
||||
["opencode-go", "OpenCode Go"], ["clinepass", "ClinePass"], ["opencode-zen", "OpenCode Zen"], ["kilo", "Kilo Gateway"], ["commandcode", "Command Code"],
|
||||
["together", "Together AI"], ["fireworks", "Fireworks"], ["siliconflow", "硅基流动"], ["nvidia", "NVIDIA NIM"], ["modelscope", "魔搭 ModelScope"],
|
||||
["aihubmix", "AiHubMix"], ["pipellm", "PipeLLM"], ["302ai", "302.AI"], ["cherryin", "CherryIN"], ["yylx", "鱼鱼连线"],
|
||||
|
||||
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 19 KiB |
@@ -101,7 +101,7 @@ dd .m { display: inline-block; font-size: 12.5px; border: 1px solid var(--line);
|
||||
"tencent-cloud": ["Tencent Cloud", "tencentcloud-color.svg"],
|
||||
"tencent-token-plan": ["Tencent Cloud", "tencentcloud-color.svg"], "tencent-tokenhub": ["Tencent Cloud", "tencentcloud-color.svg"], "tencent-tokenhub-cn": ["Tencent Cloud", "tencentcloud-color.svg"],
|
||||
huaweicloud: ["Huawei Cloud MaaS", "huaweicloud-color.svg"], volcengine: ["Volcengine Ark", "volcengine-color.svg"],
|
||||
mistral: ["Mistral", "mistral-color.svg"], groq: ["Groq", "groq.svg"], openrouter: ["OpenRouter", "openrouter.svg"],
|
||||
mistral: ["Mistral", "mistral-color.svg"], groq: ["Groq", "groq.svg"], nous: ["Nous Portal", "nousresearch.svg"], openrouter: ["OpenRouter", "openrouter.svg"],
|
||||
"opencode-go": ["OpenCode Go", "opencode.svg"], "opencode-zen": ["OpenCode Zen", "opencode.svg"], together: ["Together AI"],
|
||||
fireworks: ["Fireworks"], siliconflow: ["SiliconFlow"], nvidia: ["NVIDIA NIM", "nvidia-color.svg"], modelscope: ["ModelScope", "modelscope-color.svg"], aihubmix: ["AiHubMix"], "302ai": ["302.AI"], yylx: ["鱼鱼连线"],
|
||||
"ollama-cloud": ["Ollama Cloud", "ollama.svg"], ollama: ["Ollama", "ollama.svg"], lmstudio: ["LM Studio"],
|
||||
|
||||
Reference in New Issue
Block a user