Guide · Chapter 3

Models and providers

Add model providers and coding agents, steer effort and mode from the model name, and set backups for when a provider fails.

Add a provider

A provider is any service that answers when you hold a key or an account for it: Anthropic, OpenAI, OpenRouter, Groq, Qoder cloud and others. Once you add one, its models appear in every model picker in Filament and in every tool that connects to Filament.

Settings › Providers with the Add a provider sheet open on its first step: the providers to pick from, and Another address.
Settings › Providers with the Add a provider sheet open on its first step: the providers to pick from, and Another address.

How to use it

  1. Open Settings › Providers and press Add a provider.
  2. Pick the provider and its plan.
  3. Paste your key. Filament tests it and lists the provider’s models, each with a tick.
  4. Untick any model you don’t want in the picker, then press Add.

Qoder cloud signs you in through your browser instead of asking for a key. The provider is added even if the test fails, so you can fix the key afterwards.

Manage a provider and its models

Each provider has its own page. There you check that it works, choose which of its models appear in the picker, and change its key. Every change on the page is saved at once.

A provider's page in Settings › Providers: Test at the top, the sealed key with Replace, and model rows with a tick each, Ping, Agents at once, Tune › and Backups ›.
A provider's page in Settings › Providers: Test at the top, the sealed key with Replace, and model rows with a tick each, Ping, Agents at once, Tune › and Backups ›.

How to use it

  1. In Settings › Providers, open a provider’s row. The dot on the row shows how its last test went.
  2. Press Test to check the connection and the key.
  3. Tick a model to keep it in the picker, or untick it to hide it. ▸ shows the ids in a model family.
  4. Press Ping on a model to send it a tiny real request.
  5. Press Tune › to set what a model can do. You can also add a model by its name.
  6. To change the key, press Replace. Leaving the field empty keeps the current key.
  7. Remove first lists the routes that will go with the provider and what it answered in the last 30 days.

The provider’s name, prefix, address, auth style, wire API and extra headers are under Advanced.

Use a coding agent as a model

Filament can drive Claude Code, Codex, Cursor, Qoder CLI and Gemini CLI the way it drives a model. The agent runs on your computer, in your project folder, with its own tools: file reading and editing, the shell and its own MCP servers. Your login and subscription stay inside the agent.

Settings › Coding agents: Add a coding agent listing Claude Code, Codex, Cursor, Gemini CLI and Qoder, each with Connect.
Settings › Coding agents: Add a coding agent listing Claude Code, Codex, Cursor, Gemini CLI and Qoder, each with Connect.

How to use it

  1. Install the agent and sign in to it once:
    • Claude Code: npm i -g @agentclientprotocol/claude-agent-acp (Claude Code must already be installed), then claude auth login
    • Codex: npm i -g @openai/codex, then codex login
    • Cursor: install the Cursor CLI (on Windows, in PowerShell: irm 'https://cursor.com/install?win32=true' | iex), then agent login
    • Qoder CLI: npm i -g @qoder-ai/qodercli, then qodercli login
    • Gemini CLI: npm i -g @google/gemini-cli, then run gemini once
  2. Claude Code, Codex and Cursor turn on once Filament finds them. If you installed one after Filament started, press Detect installed agents on the console’s Destinations › Upstreams page.
  3. To turn on Qoder or Gemini CLI, press Connect in Settings › Coding agents.
  4. Pick a model by the agent’s prefix, for example claude-code/sonnet, codex/gpt-5.3-codex-high or cursor/composer-2.5.

Use your Claude or ChatGPT subscription

Anthropic and OpenAI allow Claude Pro and Max, and ChatGPT Plus, Pro and Team, only through their own tools. So Filament doesn’t imitate those tools. It runs the official Claude Code or Codex as an agent, signed in to your account.

How to use it

  1. Install Claude Code or Codex and sign in once (see the section above).
  2. Ask for a claude-code/… or codex/… model.
  3. Keep pay-per-token API keys on a normal Anthropic or OpenAI provider.
  4. For a Qoder account, add Qoder cloud and press Log in with Qoder. A browser window opens. You can also paste a personal token (pt-…) as the key.
  5. Ask for Qoder’s models as qd/…, for example qd/qmodel_38max.

The Qoder card shows your remaining credits, when they reset and when the login expires. When an account is logged out or out of credits, requests to it fail with a clear message.

Set backups for when a provider fails

Providers fail: rate limits, outages, a model they don’t have, an expired key. A model with backups moves a request to the next provider in its list when the current one fails before it starts answering, so the request still gets an answer.

How to use it

  1. In Settings › Providers, turn on Use backups when a provider fails. It stays off until you turn it on. It is the same switch as Failover between providers on the console’s Home page.
  2. Open a provider’s page and press Backups › on a model’s row.
  3. Add a backup: pick a provider, then the model’s name at that provider. Filament suggests names from that provider’s list.
  4. Reorder backups with ↑ ↓, remove one with ×, and read the sentence under the list.
  5. The model’s row then shows its backups, for example Then OpenRouter as z-ai/glm-5.3, then ….

A provider that fails cools down for a while and is tried last until it recovers. Each repeat failure makes the cooldown longer.

Steer from the model name

You can change effort, speed, agent mode and session without opening any settings. It all rides on the model name, so it works from any tool that lets you type one:

<route name>[-effort][-fast][@mode][#session]

How to use it

  1. Add an effort level: -low, -medium, -high, -xhigh or -max, as in claude-opus-5-xhigh. It overrides the effort your tool sends.
  2. Add -fast for Anthropic fast mode, as in claude-opus-5-xhigh-fast. Only Opus 5 and Opus 4.8 have it; other models run at normal speed.
  3. For a coding agent, add a mode: @agent (full tool access), @plan (read-only planning) or @ask (questions only). You can switch modes in the middle of a chat.
  4. For a coding agent, add # and the first characters of a session id to continue that session, as in claude-code/sonnet#3716601d.

You can combine pieces, as in cursor/grok-4.6-xhigh@plan, and they can come in any order at the end of the name.

Continue an agent’s session

Each chat maps to one agent session, and that link survives restarts. You can also pick up a session you started in the agent’s own terminal, with all of its history.

How to use it

  1. In a Filament chat, type /sessions to list the agent’s sessions: name, id, folder and last activity.
  2. Type /resume followed by an id, or a few words of the session’s title, to attach this chat to that session.
  3. From another tool, add # and the first characters of the id to the model name.
  4. Type /new in a Filament chat to start a fresh session. The earlier messages are not sent along.
  5. In the console, Home › Agents lists the sessions for any chat. Forget lets one go.

After four hours of silence the agent lets go of a session but keeps it on disk. A Filament chat reopens the same session on its next message, until the session has gone unused for 30 days.

Modes, effort and context for agents

Each agent names its modes and effort levels its own way. Filament maps the common words onto each agent, so @plan and -high work across agents wherever the agent supports them.

How to use it

  1. Mode: use @agent, @plan or @ask. The agent’s own mode id works too, for example @bypassPermissions. Codex has only agent and plan, as does Cursor through its official SDK, so @ask runs as plan on them.
  2. Effort: Cursor takes it in the model name (cursor/grok-4.6-xhigh). Claude Code takes it as its effort option (Haiku has none, and Filament says so). Codex takes the levels its model lists (codex/<model>-high) or your tool’s effort picker.
  3. Let the agent choose the model with auto, as in cursor/auto or gemini/auto.
  4. For a bigger context window, choose the variant, such as opus[1m] or claude-fable-5-1[1m].
  5. Type /status in a Filament chat to see the current mode and, when the agent reports it, how full the context is.

What an agent gets from your chat

Filament stands in for the editor that normally runs the agent. It sends the agent your words, not your tool’s whole setup, and decides which folder the agent works in.

How to use it

  1. Your newest message is the prompt. When a chat that already has history moves to an agent for the first time, the earlier turns are sent once.
  2. Images go to agents that accept them (Claude Code and Cursor do). For other agents they are dropped, with a note.
  3. A PDF goes as its text, page by page. Other text files are passed along or inlined, and binary files are named.
  4. Your tool’s system prompt, tools and MCP servers are not sent. The agent uses its own.
  5. The folder comes from the Working directory: line in your tool’s system prompt, then the x-filament-cwd header, then acp.cwdDefault.
  6. To keep agents inside certain folders, list full paths in acp.cwdAllowlist, such as C:\Projects or /home/you/projects. Leave it empty to allow any folder.

Answer agent questions in your own tool

When an agent asks you something (a choice, a plan, a permission), Filament turns it into your tool’s own question card. Once you answer, the same agent turn continues.

How to use it

  1. For questions, there is nothing to set. By default (acp.clientBridge set to prompts), the agent’s questions arrive as your tool’s AskUserQuestion and its plan as TodoWrite.
  2. To be asked about permissions too, set the agent’s acp.permissions to ask on its card in the console’s Destinations › Upstreams. You then see the agent’s options: Allow, Allow always and Reject.
  3. Answer in your tool. A question waits 60 minutes by default (acp.clientWaitMinutes).
  4. A new message cancels an open question and interrupts the agent.
  5. If you want Gemini’s and Qoder’s file reads, writes and commands to run as your tool’s own Read, Write and Bash cards, set acp.clientBridge to full. For Claude Code, native does the same. Both are slower, so they are off by default.

Use Cursor two ways

You can reach Cursor through its CLI, the default cursor/… models, which sign in with agent login. You can also use Cursor’s official SDK, the cursor-sdk/… models, with a Cursor API key. Both bill your Cursor plan, and you can keep both and compare them.

How to use it

  1. In the console, open Settings › Templates and apply Cursor through the official SDK. It adds the provider and a cursor-sdk/* route.
  2. Create a key at cursor.com/dashboard → Integrations → API keys.
  3. Paste it on the card under Destinations › Upstreams, press Save changes, then Test.
  4. If the SDK is missing, press Install on the card, or run npm install -g @cursor/sdk once.
  5. Ask for cursor-sdk/composer-2.5-fast, cursor-sdk/grok-4.6-xhigh or cursor-sdk/auto. @plan works as well.

The SDK takes a message you send while it works into the running turn. With acp.clientBridge set to full, its edits and commands run through your tool’s own cards. The CLI keeps its own hands.

Create a virtual model

A virtual model is a plain name of your own, such as free-model, that stands for a list of providers in order. Any tool can ask for that name, and Filament sends the request to the first provider that answers.

How to use it

  1. In the console, open Destinations › Routes and press New virtual model.
  2. Name it with a plain word, such as free-model.
  3. Add providers in order, each with the model’s name at that provider.
  4. Press Save changes.
  5. Make sure Failover between providers is on. While it is off, only the first entry is used.
  6. Ask for free-model from any tool.

Choose where model names go: routes

A route says that a model name looking like this goes to that provider as model X. Most people never need to touch routes: a provider you add gets one for its models. Use the Routes page when you want your own names or a different order.

How to use it

  1. In the console, open Destinations › Routes.
  2. Type a name into Try a model name to see which route it hits and why.
  3. Open a route to edit it: the names it accepts (an exact name, a pattern like claude-*, or a regular expression starting with re:), the provider and model, backups and strategy, format and rule overrides.
  4. Routes are checked from top to bottom, and the first match wins. Use the arrows to put specific routes above broad ones. The page warns you when a route can never be reached.
  5. Press Save changes.

By provider shows the same routes grouped by provider. Its + route button starts a route for a provider that has none.

Add any server, including local models

Filament works with any server that speaks the OpenAI Chat Completions or Anthropic Messages format. That includes Ollama, LM Studio and vLLM on your own machine, a gateway or a router.

How to use it

  1. In the console, open Destinations › Upstreams and press + Add.
  2. Choose OpenAI-compatible server or Anthropic-compatible server.
  3. Enter its address and key, then press Test connection.
  4. If the card says the models were fetched and offers to add a route, press it. The models become <id>/<model> in every tool.
  5. Click a model’s name to ping it. Untick show to keep a model out of every picker. It still works when asked for by name.
  6. Press Save changes.

Limit how many agents run on a model

Agents at once caps how many of Filament’s agents run on one model at a time, across all your chats. Use it when a provider or plan takes only a few calls at once.

How to use it

  1. Open Settings › Providers and the provider’s page.
  2. On the model’s row, set Agents at once from 1 to 64. Leave it empty for no limit.
  3. For a coding agent’s model, set the same row under Settings › Coding agents.

When a provider refuses more calls on your account, Filament learns a lower ceiling for that model and says so under the row. See Security and reliability for how that ceiling lifts.