custom-llm-provider-setup
БесплатноБез исполняемых скриптовНе проверенWire any OpenAI-compatible LLM API into Hermes Agent as a custom provider — Cloudflare Workers AI, self-hosted vLLM, Ollama, LM Studio, or any service that…
от mina-atef-00405 установок в других каталогахОб этом скилле
Custom LLM Provider Setup
Wire any OpenAI-compatible API endpoint into Hermes Agent. The
provider: custom path works with any service that implements
/v1/chat/completions — Cloudflare Workers AI, Ollama, vLLM,
LM Studio, Portkey, AI/ML API, and dozens more.
When to Use
- The provider is not in Hermes's built-in list (OpenRouter, Anthropic, Gemini, etc.)
- It speaks OpenAI wire-format (
/v1/chat/completions) - You just need a base URL + API key — no custom auth flow
If the provider has its own auth (OAuth refresh, token exchange,
non-Bearer scheme), you need a built-in provider or a plugin
instead — see hermes-agent/SKILL.md → Adding Providers.
⚠️ Critical: API Key Location
The custom provider only reads OPENAI_API_KEY from .env when
the endpoint host is openai.com or openai.azure.com. This is a
deliberate host-gated credential guard to prevent leaking your OpenAI
key to arbitrary endpoints (source: hermes_cli/runtime_provider.py).
For any other endpoint (Cloudflare, Ollama, vLLM, LM Studio, etc.)
the API key MUST be in model.api_key inside config.yaml, or in a
named entry under providers:.
Option A: Inline model.api_key (simple, single provider)
# ~/.hermes/config.yaml
model:
provider: custom
default: "your-model-id"
base_url: "https://your-endpoint/v1"
api_key: "your-api-token"
Set via CLI:
hermes config set model.provider custom
hermes config set model.base_url "https://your-endpoint/v1"
hermes config set model.default "your-model-id"
hermes config set model.api_key "your-api-token"
Option B: Named providers: entry (recommended for multiple)
Keeps several endpoints switchable without rewriting config each time:
# ~/.hermes/config.yaml
providers:
my-provider:
model: "your-model-id"
base_url: "https://your-endpoint/v1"
api_key: "your-api-token"
context_length: 131072 # optional: override context window
Switch to it:
hermes config set model.provider my-provider
hermes config set model.default "your-model-id"
Both providers: (newer dict format) and custom_providers: (legacy
list format) are supported.
Context length
If your model has a non-standard context window (e.g. Kimi K2.6 has 262k), set it explicitly so Hermes doesn't truncate or use defaults:
hermes config set model.context_length 262144
Or per-provider in the providers: entry.
Verify the Endpoint
Before wiring it into Hermes, confirm the endpoint speaks OpenAI format:
curl -s --request POST \
--url "https://your-endpoint/v1/chat/completions" \
--header "Authorization: Bearer $TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "your-model-id",
"messages": [{"role": "user", "content": "Say hello in one word"}],
"max_tokens": 10
}' | python3 -m json.tool
Expected: {"object": "chat.completion", "choices": [...]}.
If the endpoint has a non-standard URL path (e.g. requires an
account ID in the path, or uses a different prefix), inspect
the provider's OpenAI-compatibility docs — see references/
for per-provider guides.
Switching Models After Setup
hermes config set model.default "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
Or use /model inside a running Hermes session.
Caveats
- API key host-gating: The
OPENAI_API_KEYenv var is ONLY forwarded toopenai.com/openai.azure.comhosts. For any other endpoint, usemodel.api_keyin config.yaml or aproviders:named entry (see ⚠️ Critical above). - Model id format: Some providers require a prefix (
@cf/...,@hf/...). Use whatever the provider's docs say for model ID. - Fresh session needed: Config changes need a new Hermes
session (
/resetor start a newhermesprocess). - Non-chat endpoints: Embeddings and text completions are not covered here — Hermes uses chat completions for the agent loop.
Free-tier and multi-model validation
- A model catalog — the provider's own or a third-party's — proves visibility, not callability. Families may need one-time registration, deployments may be missing for your account, and "free" listings can turn out paid. Probe every candidate model with a minimal chat completion before building any configuration around it.
- Probe big reasoning models with
"stream": true— on free tiers they can queue for minutes before the first byte, and a non-streaming probe dies with a meaningless timeout.000= no HTTP answer at all (inconclusive — retry streaming with a longer cap);403= model family not registered for your key (register it via the provider's model page);404= deployment not found for your account (dead — exclude the model). - A
200probe does not prove the model is usable in agent practice. The authoritative tests arehermes chat -Q --provider <p> -m <model> -q "Reply with the single word OK"(the prompt MUST go through-q; a bare positional prompt after `-Q
Установить custom-llm-provider-setup в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл custom-llm-provider-setup?
Wire any OpenAI-compatible LLM API into Hermes Agent as a custom provider — Cloudflare Workers AI, self-hosted vLLM, Ollama, LM Studio, or any service that implements /v1/chat/completions.
Как установить скилл custom-llm-provider-setup?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл custom-llm-provider-setup запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic