AI Gateway Developers Tuning

Tuning

When Claude Code, OpenCode or Codex hands work to a subagent, Tuning tells it which model to use for that kind of work. You set a ranked list of models for each role. The coding tool gets the advice, and in Enforce mode Forgebench also switches the subagent to the right model.

Roles

Each subagent request is matched to one of seven roles: explore, plan, implement, review, test, debug and docs. Each role has up to three models, in order of preference.

Forgebench suggests models for each role from benchmark results, limited to models your workspace can reach and price. You can accept the suggestions or choose your own. A model you pick yourself needs to be reachable in your workspace and allowed by the calling key.

Forgebench identifies a role from the marker it asks the subagent to put at the start of its prompt, then from an agent name you've bound to a role, then by classifying the task. To bind a name, open Roles → Agents. The list suggests names seen in recent calls from the last 30 days. Names are labels, not permissions.

Developers → Tuning → Roles: the mode switch, the seven roles and the agents bound to them
Developers → Tuning → Roles: the mode switch, the seven roles and the agents bound to them

Modes

ModeWhat happens
OffNothing changes. This is the default.
AdviseThe main session is told which model each role should use. Subagents keep the model they asked for, and Forgebench records which model was advised.
EnforceAdvice as above, and a Claude Code or OpenCode subagent is switched to the role's first permitted model. Codex subagents and Claude Code forks are never switched.

Set a mode for the whole workspace, or override it for one coding tool. A mode other than Off needs a published policy. Changes apply to new sessions. A session that is already running keeps the policy it started with until it goes idle.

Edit the workspace policy

Admins, and members with meta_harness:write, edit the policy from the Team view. Others see it read-only. The tab has three views:

  • Roles: the models for each role, and the agent names bound to roles.
  • Practices: short rules your team wants every session to follow, and pointers to governed skills to load when a trigger applies. Keep the rules short. Put long procedures in a skill. Pointers must refer to skills in your registry that are registered or active, or the policy can't be published. A pointer suggests a skill to load. It doesn't install it or force it to load.
  • Versions: every published version, with a diff against the live one.
Practices: short rules for every session, with the byte budget they use
Practices: short rules for every session, with the byte budget they use

Your edits are a draft and affect nothing until you publish. Publishing creates a new version, and the live one never changes after that. Errors, such as an empty role or a model that isn't available, block publishing. Warnings, such as a model with no benchmark data, don't. To go back, roll back to an earlier version. That publishes it again as a new version. If someone else saved first, you're told and can reload before continuing.

Set your own mode

Open Tuning from the Personal view to see the models and practices that apply to you, and to choose Off, Advise or Enforce for yourself. Your choice saves even if the workspace switch is off, and the page says it has no effect yet. Fields your admin has locked can't be changed, and without access the page shows No access.

Claude subscription advice

By default, Tuning advises only on traffic that Forgebench funds. Admins can also turn on advice for Claude Code sessions that use a Claude subscription, in Client settings on the Tuning tab's Team view. For these sessions Tuning only adds advice. It never changes a model or effort, even in Enforce mode. Confirm that this fits your Anthropic terms before you turn it on.

See whether it worked

In a session's trace, a subagent call that ran on a different model shows the requested model and the served one. Each subagent call is one of:

ResultMeaning
MatchedThe session asked for the advised model.
EnforcedIt asked for another model and Forgebench switched it.
DivergedIt asked for another model and nothing switched it.
UnknownThe call had no role or advised model.

A call with missing data isn't counted as a failure.

Cookie settings

Our Cookie Policy lists every cookie and what it does.