/homelab-ops:llm-router-opsfrom homelab-ops
Operate a self-hosted OpenAI-compatible LLM router — client-wiring per client, context-window ad gotcha, env-vs-persisted-config gotcha, why an unauth health probe should 401. Use wiring a client, adding a backend, diagnosing misbehavior.
Ships in homelab-ops. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A self-hosted LLM router (e.g. LiteLLM) gives every consumer — human tool or agent — one shared base URL and one shared bearer key, and load-balances or routes to whichever backend actually serves a given model alias. This is the generic client-wiring and operational-gotcha pattern; your own base URL, model aliases, and key-storage location stay in your own inventory.
Every client type needs the same three things: base URL, bearer key, model alias. The alias is what decouples a client from knowing which backend is really serving it.
curl -s https://<router-host>/v1/chat/completions \
-H "Authorization: Bearer $ROUTER_MASTER_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "<alias>", "messages": [{"role": "user", "content": "hello"}]}'
from openai import OpenAI
client = OpenAI(base_url="https://<router-host>/v1", api_key=os.environ["ROUTER_MASTER_KEY"])
Any tool with an "OpenAI-Compatible" or "OpenAI API" provider type (chat UIs, low-code agent builders, Ansible-style role group vars) takes the same two values — base URL and key — with no other client-specific config needed.
null/unset advertised context, which starves any consumer
that trusts the router's advertised limit to decide how much to send.GET /v1/models (with the bearer key) lists the new alias, and
its advertised context window is the real one, not null.Many chat-UI-style front ends persist their provider config in their own database and will silently let that override the environment on a redeploy — so a correct env var stops mattering after the UI's admin panel has ever been touched. If the front end has a "persistent config" or equivalent toggle, disable it so the environment is authoritative on every restart, instead of the tool re-applying whatever was last saved in its UI.
If the router's own error-classification path unconditionally imports an
optional dependency (a DB client, a metrics library) to decide whether a
failure is an outage vs. a plain auth rejection, and a version bump of the
router's package drops that dependency as a transitive pull, every
rejected or missing key starts returning a generic 500 instead of a 401 —
masking real auth failures as opaque server errors. If backend-classifier
logic in your router depends on an import succeeding for an isinstance
check, pin that package explicitly even though you never call it directly.
If the router requires the bearer key on every route including
/v1/models, an unauthenticated health check will always see 401 — that
is correct and not a misconfiguration. Don't "fix" a monitoring probe by
loosening auth on the models endpoint; fix the probe to send the key.
curl -s https://<router-host>/v1/models \
-H "Authorization: Bearer $ROUTER_MASTER_KEY" | jq '.data[].id'
Every alias you expect is present, and each carries a non-null advertised context window.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
9 skills in this plugin
/dell-idrac-bmc-opsBring a Dell PowerEdge BMC (iDRAC) onto the network headlessly, standardize settings, stage firmware, drive an unattended install — Redfish/racadm gotchas, identity-before-power, phantom-drive from stale firmware. Use bringing up/diagnosing a BMC./homelab-runbooksUse when powering on a sleeping DR node, converging DNS records for a new ingress vhost, or bringing up OpenBao/Terrakube JWT identity — homelab operational runbooks for power management, DNS, and secrets-engine bring-up./monitoring-firstRead system state from monitoring and close telemetry gaps./proxmox-cluster-opsOperate a Proxmox VE cluster safely — monitoring-first state checks, quorum-respecting node updates, and joining a new node. Use for cluster operations, rolling updates, or adding a node./pxe-netbootReliable remote OS install over PXE when virtual-media/KVM is broken — proxyDHCP+TFTP via dnsmasq, kernel/initrd over HTTP, custom iPXE with embedded autoexec. Use when a BMC's virtual CD is unreliable or a headless install needs netboot./terrakube-opsOperate self-hosted Terrakube (remote OpenTofu/Terraform plan/apply, state, locking) — login/plan/apply flow, gated targeted applies, lock recovery, offline-mirror gotcha, token rotation. Use for a plan/apply, stuck lock, new workspace.npx claudepluginhub jacobpevans-ai/claude-code-plugins --plugin homelab-ops