Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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-00от 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_KEY env var is ONLY forwarded to openai.com / openai.azure.com hosts. For any other endpoint, use model.api_key in config.yaml or a providers: 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 (/reset or start a new hermes process).
  • 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 200 probe does not prove the model is usable in agent practice. The authoritative tests are hermes 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
Полный SKILL.md на ClawHub

Установить 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), без исполняемых скриптов.

Похожие скиллы

Сравнить custom-llm-provider-setup с