Providers

Maki talks to LLM providers over their HTTP APIs. Models are split into three tiers: weak (cheap and fast), medium (balanced), and strong (highest capability, highest cost).

Open the model picker with /model and press Ctrl+1, Ctrl+2, or Ctrl+3 on any row to reassign it to strong, medium, or weak. Your overrides are saved to ~/.maki/model-tiers and apply across sessions.

Auth Reloading

Maki re-reads auth from storage and environment variables each time a new agent spawns (/new, retry, session load). If you run maki auth login in another terminal or change an env var, the next session picks it up without a restart.

Built-in Providers

Anthropic

  • Env var: ANTHROPIC_API_KEY
  • API: https://api.anthropic.com/v1/messages
  • Features: Prompt caching, thinking mode (adaptive/budgeted), advanced tool use
TierModelsPricing (in/out per 1M tokens)Context
Weakclaude-3-haiku, claude-3-5-haiku, claude-haiku-4-5 (default)$0.25 / $1.25200K ctx / 4K out
Mediumclaude-3-sonnet, claude-3-5-sonnet, claude-3-7-sonnet, claude-sonnet-4, claude-sonnet-4-5, claude-sonnet-4-6-1m, claude-sonnet-4-6 (default)$3.00 / $15.00200K ctx / 4K out
Strongclaude-opus-4-5, claude-opus-4-7-1m, claude-opus-4-7 (default), claude-opus-4-6-1m, claude-opus-4-6, claude-3-opus, claude-opus-4-0, claude-opus-4-1$5.00 / $25.00200K ctx / 64K out

Defaults: claude-haiku-4-5 (weak), claude-sonnet-4-6 (medium), claude-opus-4-7 (strong)

OpenAI

  • Env var: OPENAI_API_KEY (also supports OAuth device flow)
  • API: https://api.openai.com/v1
TierModelsPricing (in/out per 1M tokens)Context
Weakgpt-5.4-nano (default), gpt-5.4-mini, gpt-4.1-nano$0.20 / $1.25400K ctx / 128K out
Mediumgpt-4.1-mini, gpt-4.1 (default), o4-mini, gpt-5.1-codex-mini$0.40 / $1.601047K ctx / 32K out
Stronggpt-5.4 (default), o3, gpt-5.3-codex, gpt-5.2-codex, gpt-5.1-codex-max, gpt-5.1-codex$2.50 / $15.001050K ctx / 128K out

Defaults: gpt-5.4-nano (weak), gpt-4.1 (medium), gpt-5.4 (strong)

Google

  • Env var: GEMINI_API_KEY
  • API: https://generativelanguage.googleapis.com/v1beta
  • Features: Native Gemini API with thinking support
TierModelsPricing (in/out per 1M tokens)Context
Weakgemini-2.0-flash-lite (default)$0.07 / $0.301048K ctx / 65K out
Mediumgemini-2.5-flash (default)$0.15 / $0.601048K ctx / 65K out
Stronggemini-2.5-pro (default)$1.25 / $5.001048K ctx / 65K out

Defaults: gemini-2.5-pro (strong), gemini-2.5-flash (medium), gemini-2.0-flash-lite (weak)

Ollama

  • Env var: OLLAMA_API_KEY for cloud, or OLLAMA_HOST for local (e.g. http://localhost:11434)
  • API: http://localhost:11434/v1
  • Features: Local inference via OLLAMA_HOST, or cloud via OLLAMA_API_KEY

Maki asks your local Ollama for the list of installed models, so there's no built-in catalog. Tiers are guessed from list order: the first model becomes strong, the second medium, and the rest weak. If that guess is wrong, open /model and press 1, 2, or 3 on any row to reassign it. Your choices are saved to ~/.maki/model-tiers.

Mistral

  • Env var: MISTRAL_API_KEY
  • API: https://api.mistral.ai/v1
TierModelsPricing (in/out per 1M tokens)Context
Weakmistral-small-latest, mistral-small-2603 (default)$0.15 / $0.60262K ctx / 262K out
Mediummistral-large-latest, mistral-large-2512 (default)$0.50 / $1.50262K ctx / 262K out
Strongdevstral-latest, devstral-medium-latest, devstral-2512 (default)$0.40 / $2.00262K ctx / 262K out

Defaults: devstral-latest (strong), mistral-large-latest (medium), mistral-small-latest (weak)

Z.AI

  • Env var: ZHIPU_API_KEY (shared across both endpoints)
  • API endpoints:
    • https://api.z.ai/api/paas/v4
    • https://api.z.ai/api/coding/paas/v4
TierModelsPricing (in/out per 1M tokens)Context
Weakglm-4.7-flash (default), glm-4.5-flash, glm-4.5-air$0.00 / $0.00200K ctx / 131K out
Mediumglm-4.7, glm-4.6 (default), glm-4.5$0.60 / $2.20200K ctx / 131K out
Strongglm-5-code (default), glm-5$1.20 / $5.00200K ctx / 131K out

Defaults: glm-5-code (strong), glm-4.7-flash (weak), glm-4.7 (medium)

Synthetic

  • Env var: SYNTHETIC_API_KEY
  • API: https://api.synthetic.new/openai/v1
  • Features: Reasoning effort support (low/medium/high), open-weight models
TierModelsPricing (in/out per 1M tokens)Context
Weakhf:zai-org/GLM-4.7-Flash (default)$0.10 / $0.50200K ctx / 131K out
Mediumhf:deepseek-ai/DeepSeek-V3.2 (default)$0.56 / $1.68200K ctx / 131K out
Stronghf:moonshotai/Kimi-K2.5 (default)$0.45 / $3.40200K ctx / 131K out

Defaults: hf:moonshotai/Kimi-K2.5 (strong), hf:deepseek-ai/DeepSeek-V3.2 (medium), hf:zai-org/GLM-4.7-Flash (weak)

Model Identifiers

Models are referenced as provider/model_id:

anthropic/claude-sonnet-4-6
openai/gpt-4.1
zai/glm-4.7

If the model name is unique across providers, the prefix can be omitted.

Dynamic Providers

To add a custom provider or proxy, drop an executable script into ~/.maki/providers/. The script must handle these subcommands:

SubcommandTimeoutWhat it does
info5sReturn JSON with display_name, base provider, has_auth
models5sReturn JSON array of model entries (optional)
resolve30sReturn auth JSON (base_url, headers)
logininteractiveOAuth or credential flow
logoutinteractiveClear credentials
refresh30sRefresh auth tokens

resolve is called each time a new agent spawns, so scripts should read tokens from disk instead of caching them in memory. That way auth changes from other processes get picked up.

The base field specifies which built-in provider to inherit the model catalog from. Valid values: anthropic, openai, google, ollama, mistral, zai, zai-coding-plan, synthetic.

If your provider serves models not in the base catalog, add a models subcommand returning:

[{"id": "my-model-v2", "tier": "strong", "context_window": 200000, "max_output_tokens": 16384}]

Only id is required. Optional fields: tier (default medium), context_window (128K), max_output_tokens (16K), pricing ({input, output, cache_write, cache_read}, all per 1M tokens), supports_tool_examples (defaults to the base provider's setting). The first model listed per tier is used for sub-agents. Without this subcommand, the base provider's models are used.

Dynamic provider models are namespaced as {slug}/{model_id} (e.g. myproxy/claude-sonnet-4-6).

Script Name Rules

  • Must start with a letter or digit
  • Only letters, digits, underscores, and hyphens after that
  • Can't reuse a built-in provider's slug
  • Must be executable