What is aichat?
aichat is an all-in-one LLM CLI written in Rust — a one-shot command, an interactive shell assistant and a REPL in one tool. It registers openai-compatible clients in config.yaml, which is how Tokonomix plugs in: one client block, 130+ models.
- Runs as a one-shot CLI, a shell-integration assistant, or an interactive REPL.
- Custom backends go under
clients:astype: openai-compatible(name,api_base,api_key,models). - Per-model
supports_function_callingenables tool calling. - Open source; address a model as
<client>:<model>.
Why route aichat through Tokonomix?
- One openai-compatible client block reaches 130+ models behind a single key.
- Select
tokonomix:tokonomix-consensusfor hard reasoning turns; add a direct model to the client for high-volume edits. - Per-call spend caps bound usage, and region / origin routing keeps sensitive prompts compliant.
- Cost is metered to the cent in your Tokonomix dashboard.
Connect Tokonomix in config.yaml
Add a Tokonomix client under clients: with type: openai-compatible, the api_base, your api_key and a models list.
# ~/.config/aichat/config.yaml
clients:
- type: openai-compatible
name: tokonomix
api_base: https://tokonomix.ai/api/v1
api_key: tok-your-key
models:
- name: anthropic/claude-sonnet-4-6
supports_function_calling: true
# Opt-in (planning/review only, no tool-calling): - name: tokonomix-consensus
# aichat -m tokonomix:anthropic/claude-sonnet-4-6 "refactor this"Verify it works
- Add the
openai-compatibleclient block with your key toconfig.yaml. - Run a small prompt:
aichat -m tokonomix:tokonomix-consensus "refactor this". - Confirm the call and token usage in your Tokonomix dashboard.