---
url: https://docs.mochiexec.io/reference/cli/mochi_ai_config.md
description: Choose and configure your AI provider
---

# mochi ai config

Choose and configure your AI provider

## Synopsis

Choose which AI provider Mochi uses — Mochi's gateway, your own key, or a local model — and set its model, how far chat may go, and how long usage is kept.

## Options

| Flag | Type | Description |
|------|------|-------------|
| `-h, --help` |  | help for config |

## Options inherited from parent commands

| Flag | Type | Description |
|------|------|-------------|
| `-L, --log-level` | `string` | Log verbosity level (debug, info, fatal) (default "info") |
| `--sync` |  | Sync flow cache and workspaces |

## See also

* [mochi ai](mochi_ai.md) — Describe, explain, and diagnose executables with AI
* [mochi ai config set](mochi_ai_config_set.md) — Change AI settings
* [mochi ai config test](mochi_ai_config_test.md) — Check that an AI provider works
* [mochi ai config view](mochi_ai_config_view.md) — Show the current AI provider configuration
