AI Model Configuration
Trinity uses a tiered model system to balance quality and cost across different operations. You can configure which models are used at each tier.
Model Tiers
Trinity has four tiers, each suited to different types of work. A tier's picker always offers its own rung and every rung above it — you can assign a smarter model than a tier strictly needs, never a dumber one. A provider with nothing at a tier's level falls back to its nearest rung instead of disappearing from the picker: its best model when it has nothing that high, its weakest when it has nothing that low.
Frontier Tier
The most capable models available — each vendor's headline release. Settings carries a standing Frontier Model row like every other tier, but it's opt-in only: no operation or default cascade routes here automatically — you reach it only by hand — see Opt-in Frontier below.
Minimum intelligence level: 4 (Fable-class). Only Anthropic, OpenAI, and Sakana catalog a model this strong.
Reasoning Tier
The most capable configurable tier, used for tasks requiring deep thinking:
- Complex or security-critical story implementation
- Full plan generation (architect, story writer, and dependency mapper phases)
- Codebase audits
- Architecture analysis
Minimum intelligence level: 3 (Opus-class and above).
Standard Tier
The everyday workhorse, used for routine tasks and bounded judgment calls alike:
- Routine story implementation
- Analyst and implementer phases for everyday stories, and the folder-mapper planning phase
- Story auditing
- Onboarding Q&A, documentation generation, roadmap section generation, plan editing
Minimum intelligence level: 2 (Sonnet-class and above).
Micro Tier
Mechanical, low-intelligence tasks:
- Classification and scoring
- Preflight checklists
- Recap search triage
- Status checks
Minimum intelligence level: 1 (anything catalogued clears this floor).
Providers
Trinity supports ten AI providers:
Anthropic
The primary provider:
- Claude Fable 5.2 — frontier-class, 1M-token context; opt-in only (see below)
- Claude Opus 5.5 — reasoning-class, 1M-token context; default for the reasoning tier
- Claude Sonnet 5.5 — standard-class, 1M-token context; default for the standard tier
- Claude Haiku 5.5 — micro-class, 1M-token context; default for the micro tier
DeepSeek
Alternative provider, V4 generation:
- DeepSeek V4 Pro — standard-class, 1M-token context
- DeepSeek V4.1 Flash — micro-class, 1M-token context
Moonshot (Kimi)
- Kimi K3.1 Pro — reasoning-class, 1M-token context; Moonshot's only listed model, so it is also the pick for every other tier
Z.ai (GLM)
Zhipu GLM models via Z.ai's Claude Code integration:
- GLM 5.3 — standard-class, flagship agentic coder, 1M context; Z.ai has nothing above standard-class, so this is also its reasoning- and frontier-tier pick
- GLM 5.3 Flash — micro-class, 1M context; the micro-tier pick for Z.ai
Qwen (Alibaba Cloud)
Qwen models via Alibaba DashScope's Claude Code integration:
- Qwen4 Max — standard-class, ~1M context, native thinking; Qwen has nothing above standard-class, so this is also its reasoning- and frontier-tier pick
- Qwen3.7 Plus — standard-class, multimodal agent flagship
- Qwen3.8 Flash — micro-class, ~1M context; the micro-tier pick for Qwen
Xiaomi (MiMo)
MiMo models via Xiaomi's Claude Code integration:
- MiMo V2.6 Pro — standard-class, flagship reasoning model
- MiMo V2.6 Flash — micro-class, 1M context; Pro's cheap sibling, and the micro-tier pick for Xiaomi
Ollama
Local model support for private, on-machine execution:
- Qwen3 Coder Next — standard-class, code-focused
- Qwen3.8 27B — micro-class, current-gen general/coding model
- GLM 4.7 Flash — micro-class, lightweight MoE (30B total / ~3B active) general-purpose model
- Qwen 3.5 9B — micro-class, small general-purpose model
OpenAI (via Codex)
GPT-6 models served through the Codex harness (signed in through a Codex connection or the Codex CLI's own login, not an API key — see Claude and Codex connections). Codex answers all four tiers with four distinct models:
- GPT-6.2 Astra — frontier-class, 922k context; the Codex harness's opt-in frontier pick
- GPT-6.2 Sol — reasoning-class, 922k context; the Codex default for the reasoning tier
- GPT-6.1 Terra — standard-class, 922k context; the Codex default for the standard tier
- GPT-6 Luna — micro-class, 922k context; the Codex default for the micro tier
xAI (via Codex)
Grok, served through the Codex harness as a custom provider — it needs an xAI API key (unlike OpenAI, which uses the Codex CLI login):
- Grok 4.7 — reasoning-class; xAI catalogs nothing above or below this level, so this model serves every tier through nearest-rung resolution
Sakana AI (via Codex)
Fugu, served through the Codex harness as a custom provider — it needs a Sakana API key from console.sakana.ai (like xAI, and unlike OpenAI, which uses the Codex CLI login).
- Fugu Max — reasoning-class, 1M-token context; Sakana's cost-performance model, and the pick for the reasoning, standard, and micro tiers on a Sakana-configured install
- Fugu Ultra — frontier-class, 1M-token context; opt-in only, Sakana's headline model
- Fugu Cyber — frontier-class, 1M-token context; a specialist for deep root-cause work on large codebases. It shares Ultra's intelligence level but tier routing never resolves to it — you reach it only by pinning it on a story's step configuration. Sakana publishes no price for it, so its runs show as unpriced in the cost views
Fugu models are not available in the EU/EEA. Reaching Fugu Cyber takes two things beyond the API key above: Sakana must approve an access request — submit your use case and verified contact details at console.sakana.ai and wait for their manual review — and the key's Billing mode must be set to Pay as you go on that same console, since Cyber isn't included in Sakana's subscription tiers. Picking Fugu Cyber without both set up doesn't work.
Claude and Codex connections
Claude Code and Codex are signed in through connections: named sign-ins you add yourself under Workspace Settings → Mine → AI Models → Providers, in the Claude connections and Codex connections lists. A connection holds no password you can read back. A Claude connection is a token Trinity mints for you and keeps encrypted in your secrets; a Codex connection is a ChatGPT login kept on the machine you signed it in on. Each run of Claude Code or Codex signs in as exactly one connection, so a run never borrows the login in your own terminal.
- Add Claude connection / Add Codex connection — name the connection (a label like "Work" or "Personal"), then follow the sign-in Trinity shows: open the link, approve access, and for Claude paste the code the page shows. Trinity then makes one small test call with the new sign-in, and the connection appears as Verified only once that call has worked. A sign-in that fails leaves no connection behind.
- Rename and Remove change or delete a connection. Removing one deletes its stored sign-in, and anything that was set to use it then stops with a message saying the connection was removed, rather than quietly signing in as another one.
- Reconnect '
' signs a connection in again when its token has expired or been revoked. - Use by default makes a connection the one your runs use when nothing more specific is chosen.
- Fallback order lists, in order, the connections a run moves to when its own reaches its usage limit (see Moving on by itself: the fallback order). It is empty until you add one.
Each connection shows a status: Verified (a call has worked and none has been refused since), Not yet verified (added, but never proven), or Needs reconnecting (the agent refused its sign-in). A Codex connection is tied to the machine you signed it in on: from another machine it is listed but cannot be used until you sign it in there.
Trinity never uses the codex login already held on your machine. Codex counts as available only through a Codex connection you add here, or an OpenAI API key.
Which connection a run uses
Trinity picks the first of these that applies:
- The connection you chose for the conversation, in the composer's Connection chooser.
- The connection you chose for the project, in the project's Connection card under its AI Models settings.
- Your default connection (Use by default).
- With no choice anywhere: the only connection you have for that agent (a Codex one counts only on the machine where you signed it in). With none, a run on OpenAI with no API key asks you to connect Codex.
If you have several Claude connections, have not chosen a default and have no ANTHROPIC_API_KEY set, Trinity does not guess: the run stops and asks you to choose a default Claude connection. A choice that cannot be honoured (the connection was removed, belongs to the other agent, or is signed in on another machine) also stops the run with a message naming why, instead of falling back to a different account.
An API key and a connection can both exist. A connection you chose explicitly, for a conversation or a project, is used ahead of an API key. When you chose none, an API key in your secrets (ANTHROPIC_API_KEY, OPENAI_API_KEY) is used in preference to your default connection.
When a sign-in is refused
If a connection's sign-in is refused partway through a conversation, the failed message shows a Reconnect '
When an account reaches its usage limit
A Claude or Codex subscription has usage limits: for Claude, a session limit that resets a few hours after it starts, and weekly limits; for Codex, the usage limit ChatGPT sets for your plan. When the account a connection signs in with reaches one, Trinity pauses every agent on that connection until the limit resets, and then carries on by itself:
- A banner at the top of the app names the connection and the time its agents resume, and links to the card below.
- In each thread whose turn was refused, the reply is a quiet note saying the turn did not run and when it picks up again. You don't need to send anything again: at that time the agent answers what it was answering.
- Runs and story stages that were refused wait, then continue where they were. A story waiting on the limit is not counted as a failed attempt.
- Nothing new is started on that connection until the reset. A message you send in the meantime waits with the rest and is answered when the limit resets.
- Each project with paused work gets one card asking what to do, listed under Needs you in Threads and in your inbox.
The card names the connection, which limit it reached (the 5-hour session limit or a weekly one), when it resets, and how many stories, runs and conversations are paused in that project. It sits on the project's release thread when the paused work belongs to a release, and otherwise on the conversation that paused first. It offers three choices, and a fourth that is yours alone:
- Switch and resume. Pick another of your connections of the same kind (one that hasn't reached its own limit) and whether the switch is for This project or the Whole workspace, then choose Switch and resume. Trinity sets that connection as the project's connection or as your workspace default, the same settings the connection choosers in project settings and in Providers change, and the paused work picks up straight away on it. Nothing runs twice: when the original limit resets later, the work that already resumed is left alone. A thread that you set to use the paused connection itself keeps waiting for the reset, and so does a project with its own connection set when you switch the whole workspace. The card says how many stay paused.
- Add a connection. Opens Providers, where you can add one. The card stays open, and once the new connection is listed it is one you can switch to.
- Wait for the reset. Closes the card. The work picks up by itself at the reset, as it would have anyway.
- Snooze until reset. Moves the card's thread out of your list until the limit resets (see Threads). It leaves the card open, and it works on any machine, since the snooze is your own and not the paused work's.
Unless you set a fallback order (below), Trinity only ever moves paused work to a connection you choose here. The card can only be answered on the machine where the work is paused; on any other machine it says so. When the limit resets, any card still open closes by itself, and so does a project's card once a switch has moved all of its paused work.
If the limit names no reset time, Trinity tries the connection again after 30 minutes. A conversation that belongs to no project (the Help assistant) can't wait on its own: its note says to send the message again once the limit resets.
Moving on by itself: the fallback order
If you would rather not be asked, give each agent a fallback order: the connections to move to, in order, when the one your work runs on reaches its limit. Set your workspace order under Providers, in the Fallback order of the Claude connections or Codex connections list: add connections, and move them up or down. It is empty unless you fill it, and with it empty nothing ever moves without you choosing on the card.
With an order set, when a connection reaches its limit:
- The paused work moves to the first connection in your order that hasn't reached its own limit, and picks up there straight away. Instead of a card asking what to do, the project gets a note saying which connection reached its limit, when it resets, and where the work went. Nothing runs twice.
- New work starts on that connection too, for as long as the first one is at its limit. Once the first connection resets, new work goes back to it; work that already moved finishes where it is.
- If every connection in your order is at its limit too, the work waits and you get the usual card, which also names the connection whose limit resets soonest.
Only a connection your order names is ever used, and the order never replaces the connection you chose: it applies only while that one is at its limit. A project can have its own order: in the project's Connection card, choose Set an order for this project and add connections. It replaces your workspace order for that project; left empty, it turns automatic moving off there. Use my workspace order goes back to your workspace order.
When the provider chosen for a child can't run
An agent that dispatches work to child agents can pick the provider one of them runs on, such as a reviewer that should be a different vendor's model than the rest of the work. When that provider can't run the child on this machine, the child never starts on your default provider instead. It waits before its first turn, and its thread shows a card, listed under Needs you, that names the child and the provider and says why:
- Not connected. The provider has no connection or key on this machine.
- Sign-in needs to be redone. The connection it would use was removed, is signed in on another machine, or was refused.
- At its usage limit. The provider's account has reached a usage limit, and the card says when it lifts.
Connecting or signing in again needs no answer on the card. The card's Connect or Re-authenticate button opens Providers, and the child starts by itself as soon as the provider works: when the connection answers, when you save its key, or when the limit lifts. The card closes with a line saying so. Two choices take another course:
- Switch and run. Pick another provider that can run the child on this machine, then choose Switch and run. The child runs on that provider and keeps it for every later attempt.
- Cancel the child. Ends the child. The agent that dispatched it is told it was cancelled.
The card can only be answered on the machine where the child waits; on any other machine it says so. If the child ends another way, the card closes by itself. A child whose agent chose no provider is unaffected: it runs on the model its tier resolves to, and a missing key stops it.
First launch: Connect an agent
After the agent CLIs are installed, Trinity checks that you have a way to sign in to the agents your models run on. If your models use Claude Code and you have no verified Claude connection and no Anthropic API key, or use Codex and have no verified Codex connection on this machine and no OpenAI API key, a Connect an agent step stops you before the app opens. It offers Add Claude connection and Add Codex connection (with a Recheck), plus Open Providers and Change models for the other ways out. Those screens, and Workspace Settings, are never blocked by it.
Configuring Models
- Open Workspace Settings and switch to Mine
- Open AI Models → Models
- For each tier, pick a harness → provider → model cascade:
- Harness — the CLI/runtime that actually executes the agent. Choose Claude Code (which talks to every Anthropic-compat provider below — Anthropic, DeepSeek, Moonshot, Z.ai, Qwen, Xiaomi, Ollama) or Codex (OpenAI's GPT-6 models, xAI's Grok, and Sakana's Fugu models).
- Provider — which vendor runs the model.
- Model — the specific model within that provider.
Switching providers restores the last model you picked for that (harness, provider) pair, so you can A/B between two providers without losing your selection. Settings are stored as harness:provider:model strings (e.g., claude-code:anthropic:claude-opus-5-5).
Picking a harness commits you to having its CLI on the machine. Trinity checks that on the way into a workspace, and again when you open a project whose own tiers name a different one, unless one of your other machines already has it — see Prerequisites → When Checks Happen. The check is a screen with two exits, not a dead end: install the CLI inline, or let Trinity move the affected tiers onto the engine you already have. That second exit writes wherever the setting came from — your workspace settings if the project inherited it, your per-project overrides if the project set it for itself — so a workspace-wide mistake gets fixed workspace-wide rather than once per project.
Defaults
Settings has a configurable row for each of the four tiers:
| Tier | Default Model |
|---|---|
| Frontier | Claude Fable 5.2 |
| Reasoning | Claude Opus 5.5 |
| Standard | Claude Sonnet 5.5 |
| Micro | Claude Haiku 5.5 |
Frontier's row works exactly like the other three — it's just never reached automatically (see Opt-in Frontier below). A manual pick that asks for the tier resolves to whatever you've configured there, or Claude Fable 5.2 if you haven't touched it, or, on a provider with no frontier-class model, that provider's best available model.
The first entry in each row's model list is the inherit entry, and it reads two ways depending on the surface. On a settings tier it names the layer above — Inherit workspace, Inherit default — because the value there is somebody else's to change. On a project's Model Overrides it names the resolved model instead — Inherited (<model>), the model above — because what a project reader wants to know is what will actually run. Either way, choosing it leaves the row unset so the layer above keeps answering.
Retired models appear greyed out in the picker and aren't selectable. Stored settings that reference them keep working (and appear correctly in historical metrics) until you change them.
Only a real model can be saved
Every place Trinity stores a model — your own tiers for a workspace or for a single project, a workspace's defaults, a project's Model Overrides, a story's per-step picks, a release's automation overrides, and a one-conversation chat override — checks that the model is one Trinity actually carries before saving it. A name Trinity doesn't recognise is refused at the moment you save, and the message names both the row that's wrong and the value you tried to save, rather than the value being stored and the run failing on it later. Clearing a tier back to the default is still saved: that's an empty value, not a bad one.
The pickers only ever offer models Trinity carries, so this bites on values that don't come from a picker — a model set through the API, or one an agent proposed for a story's step. The check runs on the server that stores the row, so it holds however the value got there. Retired models are unaffected: they stay in the catalog (just hidden from the pickers), so a setting that names one still saves.
Tier Resolution
Most operations have a fixed tier. Two cases differ:
- Story execution — the story's analyst chooses the tier and effort of the implement, audit and docs steps when it plans, so a step you have not set runs what the analyst chose for it; the analyst step itself runs its operation's tier. You can pin one model for any step on the story's Execution Settings card, a frontier-class model included, and a pin outranks the analyst. A pinned model runs as named, whatever tier it would sit in. A step pinned to a reasoning-class model therefore costs more than one the analyst left on the standard tier, even though both go through the same pipeline.
- Planning pipeline — the story writer and dependency mapper phases run at
reasoning; the folder mapper phase runs atstandard. - The Architect — answers you at
reasoning. When it wakes on its own to read what a finished run reported and pass it on, or to start the next step, it answers atstandard. A model you pick for the conversation applies to every answer, either way.
Tier Default Resolution
Trinity picks which model to use in this priority order (highest wins):
- Explicit — if the caller passes a specific model, that wins
- Entity / job override — a model carried on a story's or release's automation overrides, or one passed when starting a run. There's no per-story/release model picker in the UI (the story Automation tab covers PR/merge toggles, not model choice), so this layer is set programmatically and rarely by hand
- My project overrides — your own model choice for this project
- Project default — the project's configured tier model
- My workspace settings — your own model choice for this workspace
- Workspace settings — the workspace's configured tier model
TIER_FALLBACK_MODEL_ID— built-in Anthropic defaults used when no layer above has been configured
If the model a layer names is one Trinity no longer offers, or one below that tier, the tier runs its default model from the same provider instead. The model picker shows the stored model as unavailable until you pick another, and saving your other settings still works in the meantime.
This is resolution-time only — it's not a runtime "retry with a fallback on failure." If a model call fails, the operation surfaces the error (the caller handles retries, usually by another pass of the story's stages or job-level retry).
Per-thread overrides in chat
Inside any AI conversation — Help Chat and the Architect — a model button in the composer opens a picker that sets the model — and, for models that support them, the reasoning effort and the answering speed — for that one conversation. The override sticks to the thread until you change or reset it, and applies only there: it doesn't touch your project or workspace defaults, or the models a run uses for its pipeline steps.
A Connection chooser beside the model button picks which Claude or Codex connection the conversation signs in with; it sticks to the thread like the model does, and leaving it unset uses the project's or your default connection (see Which connection a run uses).
When the connection the next reply would use is marked Needs reconnecting (the agent refused its sign-in), the chooser says so beside its name and in its list, and each such row names the connection replies run on instead (for example "using Sammy"), taken from your fallback order. Open the chooser and choose Reconnect '
The picker always opens on what the conversation will actually run — harness, provider, model, effort and speed are each highlighted whether that came from an override you set or from your configured defaults. There is no blank row waiting to be filled in and no "you haven't chosen yet" state: what's lit is what the next reply uses. Apply pins exactly what you see, so the conversation keeps that selection even if your defaults later change. Reset to default appears only once the conversation carries an override of its own, and removes it so the conversation goes back to inheriting from the resolution order above.
Speed
Some models answer at more than one speed. Where one does, the picker shows a Speed row: Standard — the vendor's normal queue, and what every conversation uses unless you say otherwise — or Fast, which returns the same model's answer sooner and is billed at the vendor's premium rate for that tier. The row appears only for models whose vendor actually sells a faster tier; today that is the GPT models Trinity runs through Codex, where the vendor calls it Fast. Anthropic, xAI and the local providers publish no such tier, so no row appears for them and switching to one of those models drops a Fast setting back to Standard.
One thing worth knowing before you pick it: Fast is a request, not a guarantee. Under heavy load the vendor may answer a Fast request at standard speed and charge standard rates for it, and it doesn't tell Trinity when it does — so a conversation left on Fast can occasionally cost a little less than Trinity's metrics show. A tier the model doesn't actually offer is the other direction and is handled: Trinity records what the vendor confirmed, not what you asked for, so the cost you see is never inflated by a request that was turned down.
The Default tag in the model list marks the model your settings resolve to for this conversation — the one you'd get with no override at all. It moves as your project or workspace choice changes, so the tag and "reset takes me here" are always the same model.
These pickers are scoped to the standard tier, but — per the "own rung and above" rule — that includes every model above it too, frontier-class ones included. So picking Claude Fable 5.2 or GPT-6.2 Astra for one conversation needs no separate step; you pick it the same way you'd pick any other model. A conversation whose resolved model sits below the tier's bar — a retired model a setting still names, say — is listed anyway, so the picker always shows you what you're running rather than going blank on a model it wouldn't have offered.
Opt-in Frontier
Frontier has a standing default like every other tier (Workspace Settings → Mine → AI Models → Models), but it's never assigned automatically — no operation or default cascade routes to it on its own. You reach it only by hand, in any of these ways:
- A manual model pick in Help Chat or the Architect.
- A frontier-class model pinned for a single step in a story's Execution Settings card — the step runs that model as named.
- Setting your standing Reasoning model (Workspace Settings → Mine → AI Models → Models) to a frontier-class model such as Claude Fable 5.2 — since a tier's picker always allows a smarter model, this makes every reasoning-tier operation run at frontier by default, without touching any per-step or per-turn setting.
This is deliberate: frontier is the most expensive tier, so it never turns on without someone explicitly choosing it.
Effort Levels
Recent Anthropic and OpenAI (Codex) models, plus Grok, accept an effort parameter that controls how hard the model thinks before answering. Each model supports a different subset of the ladder:
- GPT-6.2 Astra, GPT-6.2 Sol, GPT-6.1 Terra (Codex) — 6-level:
low | medium | high | xhigh | max | ultra - Claude Fable 5.2, Claude Opus 5.5, Claude Sonnet 5.5, Claude Haiku 5.5 — 5-level:
low | medium | high | xhigh | max - GPT-6 Luna (Codex) — 5-level:
low | medium | high | xhigh | max— the one OpenAI model withoutultra - Grok 4.7 (Codex) — 4-level:
low | medium | high | xhigh - Every DeepSeek / Moonshot / Z.ai / Qwen / Xiaomi / Ollama model — no effort parameter; the harness skips injecting it
Trinity's harness clamps every requested effort to what the chosen model supports, so a max request against Grok 4.7 lands at xhigh. Effort requests get recorded in the ai_events table for metrics.
Timeouts
Trinity times AI calls by the kind of work they do, not by which model tier resolves them — a quick classification call and a full plan generation are timed independently of whether they land on reasoning, standard, or micro. Individual calls range from about 10 minutes (classification, scoring) up to 2 hours (full plan generation, story implementation, auditing). A queued story or release run also carries its own governor, independent of both: it's killed only after 20 minutes with no filesystem progress in its worktree, or an absolute 4-hour ceiling — whichever comes first — so a legitimately long phase (a slow compile, a big test suite) is never cut off just for taking a while.
Cost Considerations
Model costs vary significantly:
- Frontier tier is the most expensive, and never turns on by itself — you only pay for it when you've deliberately opted in
- Reasoning tier is the next most expensive — use it where quality matters most (you can pin a reasoning-class model for a step yourself on a story's Execution Settings card)
- Standard tier offers the best quality-to-cost ratio for most work
- Micro tier is very cheap, used for mechanical classification
The Metrics dashboard tracks token usage and cost by operation, helping you understand where your budget goes.
Tips
- Start with defaults — the default configuration is well-balanced for most projects
- Use DeepSeek for cost savings — if you have a DeepSeek API key, using it for the standard or micro tier can reduce costs significantly
- Use Ollama for privacy — local models keep all data on your machine, but expect slower execution and potentially lower quality
- Monitor the cost tab — check Metrics → Cost to understand your spending patterns before making changes
- Don't downgrade reasoning — the reasoning tier handles your most complex stories; using a less capable model here leads to more failures and retries, which can cost more in the end