← MidiPilot overview

MidiPilot Settings and Providers

Everything you set up once and then stop thinking about: the provider and model connection, the prompts MidiPilot sends with each request, the settings it remembers per file, and the counters and logs that show what a request actually cost.


AI Settings

Configure your AI connection from Settings → MidiPilot AI. Select a provider, enter your API key, choose a model, and customize behavior.

MidiPilot AI settings Connection test successful
Provider configuration - Connection test: ✅ Model: gemini-2.5-flash
SettingDescription
ProviderOpenAI, OpenRouter, Google Gemini, Ollama (local), or Custom
Base URLAuto-filled per provider, or enter your own endpoint
API KeyYour provider API key - get one from OpenAI, OpenRouter, or Google Gemini. Not needed for Ollama (local).
ModelEditable dropdown populated from the active provider's cached model list. If no cache exists, MidiPilot falls back to a small built-in starter list.
Refresh ModelsFetches the live provider model list from /models, normalizes provider-specific fields, filters obvious non-chat models, and stores the result in <userdata>/midipilot_models.json.
Manage favourites…Pick the models that should stay visible per provider. If no favourites are selected, all cached chat-capable models are shown.
Force Streaming for This ModelAppears when the selected provider/model failed streaming during the current app session. Clears the temporary warning so the next request tries live streaming again.
Token LimitOptional cap on output tokens to control costs
ThinkingEnable reasoning for o-series and GPT-5.x models
Reasoning EffortNone / Low / Medium / High / Extra High
Live StreamingStreams both Simple and Agent responses live (text, reasoning summaries, and tool-call arguments) when the provider supports it. Failed paths automatically fall back to non-streaming for the rest of the session.
Prompt Profiles…Open the Prompt Profiles dialog to attach custom system prompts to specific provider/model combinations.
Context RangeMeasures before/after cursor sent as musical context (0-50)
FFXIV ModeEnable Bard Performance rule enforcement
Agent Max StepsMaximum tool calls per Agent request (5-100)
Test ConnectionVerify your API key and model work correctly

Model Refresh & Favorites

MidiEditor AI can fetch provider model lists directly instead of relying on a fixed dropdown. The refresh button is available both in Settings → MidiPilot AI and in the MidiPilot footer, so you can update models without leaving the chat panel. Refreshed models are cached for seven days and used for context-window estimates.

Refreshing provider model list Model favorites dialog
Refresh provider models, then keep the dropdown focused with per-provider favourites

When the footer refresh completes, MidiPilot reports the result in the chat/status area so you know whether the cache was updated or the provider rejected the request.

Model update status in MidiPilot chat
Model update feedback after a successful refresh

If a model fails live streaming but still works without streaming, MidiPilot retries automatically and marks that model with a warning icon for the current app session. The mark is scoped per mode - Simple Mode (no tools) and Agent Mode (with tools) are tracked independently, because some models support live streaming in only one of the two paths. The dropdown shows which mode is blocked: ⚠ <model> (Simple), (Agent), or (Simple+Agent). Use Force Streaming for This Model to clear the temporary mark after switching providers, updating the model, or testing a fixed endpoint.

Capability-aware error handling - if the active provider returns HTTP 404 with “No endpoints found that support tool use” (or any equivalent “tools not supported” error), MidiPilot stops retrying immediately, posts a clear “Model does not support tool calling - pick a different model in Settings → AI, or switch to Simple mode for this request” bubble, and remembers the flag per provider:model for the rest of the session. Picking a different model re-enables Agent Mode automatically.


Supported Providers

ProviderBase URLAPI KeyFree Tier
OpenAIapi.openai.com/v1Get API Key →Limited
OpenRouteropenrouter.ai/api/v1Get API Key →Free models available
Google Geminigenerativelanguage.googleapis.comGet API Key →15 RPM, 1M TPM
Ollama (local)localhost:11434/v1None - runs on your PCFree & unlimited
Hugging Face (via Custom)router.huggingface.co/v1HF token (Inference permission)Free monthly credits
CustomUser-specifiedUser-specifiedVaries

Local AI with Ollama (free, private, no API key)

Ollama runs an open-weight language model entirely on your own machine - no API key, no cloud account, no per-token cost, and nothing leaves your PC. Setup is a one-time step, comparable to getting a cloud API key:

  1. Install Ollama. Download it from ollama.com and run the installer. After installation the Ollama server runs in the background and listens on http://localhost:11434.
  2. Pull a model. From a terminal, run e.g. ollama pull llama3.1:8b. Pick a model that advertises the tools capability if you want to use Agent Mode (the agent drives MidiPilot's tools to compose/edit; a chat-only model can still answer in Simple Mode). Smaller models download faster and respond quicker; large models need a capable GPU and lots of disk.
  3. Configure MidiPilot. In Settings → MidiPilot AI, set Provider to Ollama (local). The Base URL auto-fills to http://localhost:11434/v1 and the API key field can stay empty. Click the 🔄 Refresh button to list your installed models (with size badges), pick one, and click Test Connection.

If Test Connection reports the server can't be reached, make sure Ollama is actually running (launch the Ollama app, or run ollama serve in a terminal), then try again.

Two things worth knowing about local models

Hugging Face via the Custom provider

The Hugging Face inference router speaks the same protocol as OpenAI, so it plugs straight into the Custom provider - no separate integration needed. This gives MidiPilot access to open-weight model families such as Llama, Qwen and DeepSeek, hosted by Hugging Face's inference partners.

  1. Create an access token. On huggingface.co/settings/tokens, create a token with the Inference permission (the "Make calls to Inference Providers" right is what the router checks).
  2. Configure MidiPilot. In Settings → MidiPilot AI, set Provider to Custom, the Base URL to https://router.huggingface.co/v1, and paste the token as the API key.
  3. Refresh the model list and pick a model. Streaming works like with any other OpenAI-compatible endpoint, and models that support tool calling can be used in Agent mode.

Prompt Profiles (Per-Model System Prompts)

Open Settings → MidiPilot AI → Prompt Profiles…, or Prompt Profiles… from the ⚙ gear menu in the MidiPilot footer, to manage profiles. A profile binds a custom system prompt to one or more model patterns and decides whether the profile replaces or appends to the default mode prompt.

FieldDescription
NameFree-text label shown in the profile list (e.g. “GPT-5.5 Decisive”, “Claude Strict JSON”).
Model patternsOne or more provider:model entries with optional glob suffix, e.g. openai:gpt-5.5*, openrouter:openai/gpt-5.5*, gemini:gemini-2.5-pro. The first matching profile wins.
System promptThe prompt text that should be sent for matching models. Markdown is allowed.
Append to defaultWhen checked, the profile is appended to the active mode prompt (Simple/Agent/FFXIV) instead of replacing it - useful for adding small, model-specific guardrails.
Hide pitch-bend events from this model (schema-level)Removes the pitch-bend event type from the tool list the model sees in Agent mode. See the note below.

Hide pitch-bend events from this model (schema-level). Of all the things MidiPilot can write into a track, a pitch bend is the cheapest to describe - a note needs a pitch, a velocity, a length and a position, a bend needs almost nothing. A model that is unsure of itself will therefore sometimes answer a “write me a melody” request with a single pitch bend and nothing else, no matter how clearly the prompt asks for notes. Tick this box and the bend simply stops being an option: it is taken out of the tool description the model receives, so it has to write real notes.

A local model is the most common reason to reach for it - see Local AI with Ollama.

The Prompt Profiles dialog with Hide pitch-bend events from this model ticked and the model bindings below

The per-profile switch: tick it for a model that writes placeholder bends and leave every other model untouched.

MidiPilot ships with one built-in profile: GPT-5.5 Decisive, bound to openai:gpt-5.5* and openrouter:openai/gpt-5.5*. It nudges the model to commit to a tool call instead of asking clarifying questions, which is a known weak spot of that family. You can edit, duplicate, or disable it like any other profile.

Prompt Profiles dialog showing the built-in GPT-5.5 Decisive profile, model patterns, append-to-default toggle, and system prompt editor
Prompt Profiles dialog with the built-in GPT-5.5 Decisive profile bound to openai:gpt-5.5* and openrouter:openai/gpt-5.5*

Custom System Prompts

Click Edit System Prompts… in settings to open the built-in editor. Each mode (Simple, Agent, FFXIV, FFXIV Compact) has its own tab with fully customizable instructions.

System Prompt Editor
Built-in System Prompt Editor with tab-based mode selection

Prompts are saved as system_prompts.json in the application directory. If no custom file exists, MidiPilot uses the hardcoded defaults.

Looking for per-model overrides? The newer Prompt Profiles dialog lets you attach a dedicated system prompt to one or more provider:model combinations - great for guiding a single “quirky” model without touching the global mode prompts.


Per-File AI Presets

Different MIDI files may need different AI settings. A 16-track orchestral arrangement needs different guidance than a 3-track FFXIV bard song. Per-file presets let you save and auto-load settings for each file.

What’s Saved

How to Use

  1. Click the ⚙ gear button in the MidiPilot footer
  2. Select “Save AI preset for this file”
  3. The current settings are saved as a .midipilot.json sidecar file next to your MIDI file
  4. Next time you open that MIDI file, the preset is auto-loaded
Gear menu with Save AI preset option
Preset saved confirmation Preset auto-loaded on file reopen

Sidecar File

Presets are stored as <filename>.midipilot.json next to the MIDI file. For example:

Sweet Child O Mine.mid
Sweet Child O Mine.mid.midipilot.json   ← preset

The preset file is a simple JSON object. All fields are optional - any field not present falls back to the global default.


Auto-Save

MidiEditor AI automatically saves a backup copy of your work at regular intervals, so you never lose progress to a crash or accidental close. Your original file is never overwritten - the backup is stored as a separate .autosave sidecar file alongside your MIDI file.

How It Works

Crash Recovery

Settings

Auto-save options are in Settings → System & Performance:

Auto-Save settings in System & Performance
Auto-Save settings with enable toggle and interval configuration
SettingDescription
Enable auto-saveToggle automatic backups on or off (default: on)
Save after idle (seconds)Seconds of inactivity before a backup is written (30-600, default: 120)

Token Tracking & Context Window

MidiPilot tracks token usage per API call and per session, with automatic normalization across providers (OpenAI, Anthropic, Gemini). The token counter is displayed at the bottom of the chat panel:

<last call> | <session total>🔥 / <context window> [<limit>✂]

Context Window Management

When conversations grow long, MidiPilot automatically manages context to prevent exceeding the model’s limit:

Multi-Provider Token Normalization

Different providers report token usage in different formats. MidiPilot normalizes all of them:


API Log

MidiPilot writes every API request and response to a log file for debugging and transparency. The log is saved as midipilot_api.log in the same directory as the MidiEditor AI executable.

DetailDescription
Locationmidipilot_api.log next to the .exe
FormatISO-8601 timestamp + direction ([REQUEST] / [RESPONSE]) + JSON body
Cleared onStarting a new chat or loading a different MIDI file - the previous log is overwritten
Manual clearDelete the file - it will be recreated on the next API call

If the AI produces unexpected results, open the log to inspect the raw JSON sent to and received from the provider. This is especially useful for debugging tool-call sequences in Agent mode.


See also