AI Configuration
About 486 wordsAbout 2 min
Entry: Settings → AI → AI configuration. The list shows every configuration; the active one carries an Active badge, the built-in one a Built-in badge. The top-right + creates a new one, and tapping a card opens the editor.
Built-in service: Muxue gateway
The built-in entry is not stored in the user configuration list; it is prepended when reading. Name and URL are decided by the provider:
| Item | Value |
|---|---|
| Name | Muxue gateway |
| API URL | https://v2.muxueai.pro |
| Default max output tokens | 4096 |
| Default temperature | 1.0 |
Name and URL are read-only in the editor. A notice at the top explains that the built-in service URL is locked and models can be fetched once an API key is present, with a Get key button opening the Muxue site.
Three fields are editable and persisted separately: API key, model, and API type.
Create a custom configuration
The editor has three sections: connection, model, advanced.
Connection
| Field | Notes |
|---|---|
| Name | For identification only, e.g. "DeepSeek main" |
| API URL | Service root, e.g. https://v2.muxueai.pro |
| API key | Masked input, stored in secure storage |
| API type | One of three, see below |
| API type | Short label | Protocol |
|---|---|---|
OpenAI Chat Completions | OpenAI | /v1/chat/completions |
OpenAI Responses | Responses | /v1/responses |
Anthropic Messages | Anthropic | Messages API |
Mobile uses a segmented control; desktop uses a dropdown.
Model
Tap Fetch models to pull the server's model list, then pick from the sheet. The sheet supports keyword search. Tapping the picker before fetching reports that the list must be fetched first.
Advanced
| Field | Notes |
|---|---|
| Max output tokens | Empty means the server default |
| Temperature | Empty means the server default |
Test the connection
The Test action at the bottom of the editor opens a test panel and sends a message that defaults to Hi, streamed. The panel reports:
| Metric | Meaning |
|---|---|
| State | Streaming / success / failure / no response |
| First token | Time to the first token |
| Duration | Total time |
| Chunks | Number of streamed fragments |
| Reply | Concatenated body |
| Error | Exception text |
| Raw response | Server payload, copyable |
A non-streamed response is labelled as such.
Common failure branches:
| Message | Direction |
|---|---|
| Enter an API key first | Add and save a key |
| Select a model first | Fetch the model list |
| Fetching models failed: … | Check the URL is the service root and the key may list models |
| No response | Check network, API type, and URL path |
Switch, edit, delete
Tapping a card opens the editor; switching and deleting happen at the bottom of that editor. Deleting asks for confirmation and includes the configuration name.
After switching, new conversations use the new configuration immediately; existing sessions keep their own history and model label.
Storage
| Data | Location |
|---|---|
| API key | System secure storage (flutter_secure_storage) |
| Name, URL, API type, model, tokens, temperature | Local preferences |
| Sessions and run logs | App private directory |
API keys never enter ordinary preference storage and are not included in run-log exports.