Models

Three inference paths. Same Harnes agent for all of them.

Three ways to bring a model

PathWhenHow
OpenRouterEvery model, one keyOPENROUTER_API_KEY — live /models catalog
OpenHostHost your own weightsHARNES_MODEL_BASE_URLopenhost.sh OpenAI-compatible endpoint
LocalFully on your machineOllama at http://127.0.0.1:11434/v1 (or any local OpenAI-compatible server)

Install

npm install -g @openharnes/harnes
# or
curl -fsSL https://openharnes.com/install | bash

Providers

ProviderWhen
openrouterOPENROUTER_API_KEY set (preferred cloud path)
openai-compatibleHARNES_MODEL_BASE_URL — OpenHost, vLLM, etc.
ollamalocal http://127.0.0.1:11434/v1
# 1) OpenRouter
export OPENROUTER_API_KEY=sk-or-...
harnes

# 2) OpenHost
export HARNES_MODEL_BASE_URL=https://your-openhost-endpoint/v1
harnes

# 3) Local
export HARNES_PROVIDER=ollama
harnes

Live catalog

/models and harnes models fetch OpenRouter’s live list, cache it ~1h at ~/.cache/harnes/openrouter-models.json, and fall back to the curated list offline.

Kept (coding-capable + tool calling + context ≥ 8192): Qwen Coder, DeepSeek, Claude, GPT, Gemini, Llama 70B/72B/405B, Mixtral, Codestral.

Dropped: tiny/weak names (2B–4B, tinyllama, phi-mini, …), no tool-call support, or context < 8192.

Pin any listed id: /model qwen/qwen3-coder or /model auto.

Curated defaults (offline fallback)

TierIdOpenRouterCtxRole
strong-openqwen3-coder-30bqwen/qwen3-coder65kDefault build / agent work
fast-openqwen3-coder-8bqwen/qwen3-coder-flash32kExplore / compact
strong-opendeepseek-v3deepseek/deepseek-chat-v3-032465kOpen-weight daily driver
frontier-byokclaude-sonnetanthropic/claude-sonnet-4.5200kHard architecture (BYOK)
frontier-byokgpt-5openai/gpt-5128kHard architecture (BYOK)

Tiers & routing

harnes route "explore this repo"   # → fast-open
harnes route "add a retry policy"  # → strong-open
harnes smoke

Session commands

CommandEffect
/modelslist live + curated catalog
/modelshow active model
/model autohybrid route per prompt
/model <id>pin a catalog / OpenRouter slug
/mode auto|plan|buildtools + routing mode

Tools (agent)

ModeTools
planread_file, glob, grep, list_dir
build+ write_file, bash

harnes smoke is the agentic gate: file-edit class models only, no weak defaults.