Providers
Tokori is provider-agnostic. Pick whatever LLM backend you have keys for (or run one locally) — the chat UI, flashcards, and reader all work the same regardless.
Built-in providers
| Provider | Local? | Streaming | Notes |
|---|---|---|---|
| Ollama | ✓ | ✓ | Easiest local setup. Pulls models from https://ollama.com. |
| OpenAI | – | ✓ | GPT-4o, GPT-4 mini, etc. |
| Anthropic | – | ✓ | Claude Sonnet 4.6, Opus 4.7. |
| Gemini | – | ✓ | Gemini 1.5 Pro / Flash. |
| OpenRouter | – | ✓ | Aggregates 200+ models behind one key. |
| MiniMax | – | ✓ | Cheap, fast Chinese-tuned. |
Switching the active provider
Settings → Providers → click Use on a configured row. The active provider applies immediately to chat, the reader's "Explain this" button, and the flashcards AI helper.
Ollama
- Install Ollama from https://ollama.com/download.
ollama pull llama3.1(or any model).- In Tokori: Settings → Providers → Add → Ollama.
- Host:
http://localhost:11434(default — change if you're reaching a remote daemon). - Pick the model from the dropdown (Tokori queries
/api/tagsto list pulled models).
Cold-start latency
Ollama lazy-loads weights on the first real request. Tokori warms the model the moment you click Use on an Ollama provider — the first chat after a session start should be hot. Subsequent restarts re-pay the cold load on the first message.
OpenAI
- Get a key from https://platform.openai.com/api-keys.
- Settings → Providers → Add → OpenAI.
- Paste the key. Pick a model.
- Optional: set a custom
base_urlto point at any OpenAI-compatible endpoint (DeepSeek, Together, vLLM, …).
Anthropic
- Get a key from https://console.anthropic.com/.
- Add as Anthropic with model id like
claude-sonnet-4-6. - The streaming uses the Messages API + Anthropic-version header under the hood.
Gemini
- Get a key from https://aistudio.google.com/apikey.
- Add as Gemini with model
gemini-1.5-proor-flash.
OpenRouter
- Get a key from https://openrouter.ai/keys.
- Add as OpenAI (it's OpenAI-compatible) with
base_url: https://openrouter.ai/api/v1. - Model id can be any of OpenRouter's catalog (e.g.
anthropic/claude-sonnet-4-6).
MiniMax
- Get a key from https://www.minimaxi.com.
- Add as MiniMax with model
MiniMax-M2-7B-Instructor whichever you've selected.
Adding a new provider
The provider abstraction lives in src-tauri/src/providers.rs — one ProviderConfig enum variant + a streaming function per kind. New providers are usually a 100-line PR. See Contributing for the full process.