Skip to content
gptme logo

gptme via Tokonomix

Add Tokonomix as a provider in gptme’s config.toml — drive the terminal assistant with 130+ models and consensus on one key.

config.toml [[providers]] / OPENAI_BASE_URLCode-running CLI assistantMIT · open sourcemacOS · Windows · Linux
gptme — terminal assistant that runs code and tools, via Tokonomix

What is gptme?

gptme is an open-source terminal assistant that drives shell, file and tool actions for you. It speaks the OpenAI protocol against any provider, so a single Tokonomix entry opens 130+ models from one key.

  • Runs shell commands, edits files and uses tools from a terminal chat.
  • Custom providers go in a [[providers]] block in ~/.config/gptme/config.toml.
  • Also reads OPENAI_BASE_URL as an environment fallback.
  • Open source; provider-agnostic.

Why route gptme through Tokonomix?

  • One provider entry, 130+ models — pick tokonomix-consensus or any direct slug.
  • Let tokonomix-consensus double-check an answer before gptme acts on it; a fast slug for routine turns.
  • Per-call spend caps bound a tool-using session; region / origin routing for compliance.
  • Reference your key from an environment variable, not the config file.

Connect Tokonomix in config.toml

Add a [[providers]] block with the Tokonomix base_url, your api_key and a default_model — then select the model on the command line.

# ~/.config/gptme/config.toml
[[providers]]
name = "tokonomix"
base_url = "https://tokonomix.ai/api/v1"
api_key = "tok_live_your-key"
default_model = "anthropic/claude-sonnet-4-6"
# Opt-in (planning/review only, no tool-calling): default_model = "tokonomix-consensus"

# then: gptme --model tokonomix/anthropic/claude-sonnet-4-6 "..."

Verify it works

  • Save config.toml (or export OPENAI_BASE_URL) and start gptme with the Tokonomix model.
  • Ask it for a small task and let it run.
  • 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