Skip to content
Crush (Charm)

Crush via Tokonomix

Declare a Tokonomix openai-compat provider in crush.json — give Charm’s terminal agent 130+ models and consensus on one key.

openai-compat provider (crush.json)Terminal coding agentMIT · open sourcemacOS · Windows · Linux
Crush — Charm’s terminal coding agent, via Tokonomix

What is Crush?

Crush is Charm’s open-source, glamourous coding agent for the terminal. It is model-agnostic and supports custom providers in crush.json — and for any third-party OpenAI-compatible API you use the openai-compat provider type.

  • A polished terminal agent that edits files and runs your tools.
  • Custom providers go in crush.json under providers.
  • Use the openai-compat type for third-party OpenAI-compatible APIs (not openai).
  • Open source, with a delightful Charm TUI.

Why route Crush through Tokonomix?

  • One provider entry, 130+ models — tokonomix-consensus for hard turns, a fast slug for the rest.
  • Per-call spend caps keep a terminal agent within budget.
  • Region / origin routing for regulated repositories.
  • Reference your key from an environment variable, not the config file.

Connect Tokonomix in crush.json

Add a provider with type: "openai-compat", the Tokonomix base_url, an api_key env reference, and your model list.

{
  "$schema": "https://charm.land/crush.json",
  "providers": {
    "tokonomix": {
      "type": "openai-compat",
      "base_url": "https://tokonomix.ai/api/v1",
      "api_key": "$TOKONOMIX_API_KEY",
      "models": [
        {
          "id": "tokonomix-consensus",
          "name": "Tokonomix Consensus",
          "context_window": 200000,
          "default_max_tokens": 8192
        }
      ]
    }
  }
}
Use openai-compat, not openai

Per Crush’s docs, type: "openai" is only for proxying real OpenAI; for a third-party OpenAI-compatible API like Tokonomix use type: "openai-compat".

Verify it works

  • Export TOKONOMIX_API_KEY, save crush.json, and start Crush.
  • Select the Tokonomix model and run a small task.
  • Confirm the call and token usage in your Tokonomix dashboard.

Model selection

Which model and endpoint should my agent use?

Pick by what your agent does, then swap the model id any time — every model in the catalog works through the same key.

What your agent doesUse this
Edits files / calls tools and streams responses (most coding agents)An Anthropic model via the Anthropic endpoint (tools + streaming both work)
Calls tools but does not need streaming (any model)The OpenAI-compatible endpoint with a single model id
Wants tools and streaming on a non-Anthropic modelRun non-streaming for now — streaming tool-calls on other providers is not enabled yet
Plain chat, no toolsEither endpoint; streaming is fine
Wants a cross-model verdict (consensus) on a high-stakes answerSet model to tokonomix-consensus on the OpenAI-compatible endpoint — note: consensus rejects tool requests (no tool-calling)
Endpoint & API reference (technical)

anthropic-messages → https://tokonomix.ai/api/anthropic — tools ✓, streaming ✓ (use an Anthropic model). openai-completions → https://tokonomix.ai/api/v1 — tools ✓ (single-model passthrough), streaming with tools not yet enabled. Plain chat: streaming works on both. Consensus: openai-completions, model tokonomix-consensus, no tools. Swap the model id to any slug returned by GET /api/v1/models.

Browse all models →

Related agents