kapi models default
kapi default [model]With no argument, prints the configured default AI provider and model.
With a model argument, sets it as the default used by AI tools and flows
when no --provider/--model flag or recipe default is given. The provider is
inferred from the model name by convention (claude-* → anthropic, gpt-* →
openai, gemini-* → gemini, an Ollama tag like gemma3:4b → ollama); pass
--provider to choose it explicitly (e.g. Azure OpenAI). Writes ai.provider
and ai.model to the global config (see kapi config path), so the setting
is shared with Kapi Desktop.
Watch it
models default needs network access, an API key, or local system access, so it can’t run in the browser playground.See the guides for a recorded run, or try it locally with the installed CLI.
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
| --color | string | auto | colorize output: auto, always, never |
| --jq | string | filter JSON output through a jq expression (implies --json) | |
| --json | bool | false | Output in JSON format |
| --output-format | string | Output format: text (alias: table), json, yaml | |
| --provider | string | set the provider explicitly instead of inferring it from the model name | |
| --text | bool | false | Output in text format (default) |
More examples
kapi models default gemma3:4b # local Ollama, provider inferredkapi models default claude-sonnet-4 # anthropic, inferredkapi models default gpt-4o --provider azureopenai← Back to the Command Reference