Skip to main content
Xynthis talks to any LLM through a provider abstraction. Providers live in ~/.xynthis/config.toml; the active one is a single line you can change from the CLI, the app, or the file itself.

The config file

[models] active takes "<provider>" (uses that provider’s default_model) or "<provider>/<model>" for an explicit model. It also takes "auto" (optionally auto:fast, auto:deep, auto:private), which hands per-call model choice to the router described in Smart Auto. An optional [models] fast names a cheaper target the agent can use for low-effort follow-up turns; unset, every turn goes to active. Each [providers.<name>] table supports: kind is one of:
  • anthropic-messages: Anthropic’s /v1/messages API with an API key.
  • openai-chat: any OpenAI-compatible /v1/chat/completions endpoint: OpenAI, Ollama, llama.cpp, Groq, DeepSeek, Gemini, xAI, LM Studio, and self-hosted servers. Two on-device presets ship built-in: apfel (Apple Intelligence, lite) and minicpm (MiniCPM5-1B via Ollama, full agentic tool use) — see Local models.
  • subprocess: spawn an installed CLI such as claude or codex and pipe the message through it. Uses the CLI’s own auth. Plain text only: no tool use, so the agent can’t act, only answer.
  • claude-oauth: call Anthropic directly with the OAuth token the Claude Code CLI stores in the macOS Keychain. Billed against your Claude subscription, with full tool use; it is the working alternative to subprocess for agent work. The claude-fable preset uses the same credential pinned to the Claude Fable model, so it appears as its own choice in the picker.
  • codex-oauth: the equivalent for a ChatGPT subscription via the codex CLI’s stored token. This targets a private, undocumented endpoint and may break without notice. The model set is what the ChatGPT account allows; unsupported model names are rejected with a 400. The codex-5-6 preset pins the Codex 5.6 model id (gpt-5.6-sol) over the same credential, as its own picker entry.
  • xynthis-llm: the on-device Xynthis model server on 127.0.0.1:8080. See On-device model.
  • echo: a deterministic, network-free fallback used when nothing else is configured.

Switching models

From the CLI:
From the app: the model picker in the chat bar lists every configured provider. Picking one writes config.toml and restarts the daemon: the chat model is constructed at daemon startup, so the restart is what makes the switch take effect. Local providers that aren’t running are shown with a start action and are launched via their launch_command. If you edit config.toml by hand, one-shot CLI commands pick the change up on their next run, but a running daemon does not. Restart it (or switch once from the app’s picker, which restarts it for you). For a single invocation, override without touching config: xynthis --llm ollama/llama3.3 chat "...", or set XYNTHIS_LLM_OVERRIDE.

API keys

Three places a key can live, checked in this order:
  1. macOS Keychain. The app’s Settings → Models tab stores keys under the com.xynthis.app service, one entry per provider (account <provider>-api-key). The CLI reads these too, so a key entered in the app works everywhere. macOS only.
  2. ~/.xynthis/auth.json. xynthis login <provider> prompts for a key interactively and stores it here. xynthis models add <provider> --api-key <key> does the same non-interactively.
  3. Environment variables, via discovery: xynthis auth scan finds ANTHROPIC_API_KEY, OPENAI_API_KEY, GROQ_API_KEY, XAI_API_KEY, DEEPSEEK_API_KEY, and GEMINI_API_KEY/GOOGLE_API_KEY, plus Claude/Codex OAuth tokens and running local servers (Ollama, LM Studio), and offers to wire what it finds into your config.
xynthis doctor diagnoses config, auth, and binary problems when a provider won’t respond.