October 24, 2026

Set Model Selection Rules Config in One Object

Set model selection rules config inside a single versioned object to assign per-task models, track token usage and route sensitive steps through your approval

Set Model Selection Rules Config in One Object — illustrated guide from Run Agents

Set Model Selection Rules Config in One Object

You need one place to define which model handles each task without scattering parameters across scripts. The Agent Command Center lets you set model selection rules config directly in a single config object that every agent you run references at execution time.

Key takeaways:

  • All model parameters stay versioned in one config object.
  • Task-specific rules trigger before any runtime call.
  • Token usage and cost estimates stream live per model choice.
  • Human approval gates any change that affects production actions.

Write Task-Specific Model Rules in the Config Object

Create explicit rules that map task types to models inside the same object that holds prompts and tools. Each rule includes model name, temperature, max tokens and fallback model. The object stores these mappings so the agent runtime backend loads the correct parameters on every start. You can reference the same object across multiple scheduled agents without duplication.

  • Task type: "research" uses gpt-4o with temperature 0.2
  • Task type: "summarize" uses claude-3-haiku with temperature 0.1
  • Task type: "code-gen" uses gpt-4o with temperature 0.0 and 8000 max tokens
  • Fallback rule applies if primary model returns error
  • Task type: "data-extract" uses claude-3-sonnet with temperature 0.3 and 4000 max tokens
  • Task type: "report-gen" uses gpt-4o with temperature 0.1 and 16000 max tokens

These entries live alongside role prompts so the entire agent definition remains traceable. See how to define role prompts in your single config object to keep prompts aligned with model rules.

Compare Model Selection Approaches

ApproachLocation of RulesVersion ControlLive Token VisibilityHuman Approval Required
Scattered scriptsMultiple filesManualNoNo
Single config objectOne versioned objectAutomaticYesYes
Runtime defaultsAgent runtime backendLimitedPartialNo

The single config object approach keeps every change auditable and prevents drift across scheduled runs. Teams that adopt this method report fewer model-related incidents because the rules surface in the same review cycle as prompt and tool updates.

Route Executions to the Chosen Model

When an agent starts, the control plane reads the task label and applies the matching rule before any call reaches your agent runtime. Logs record the exact model selected and the parameters used. This routing happens at the start of each step so intermediate outputs reflect the correct model choice from the first token.

  • Execution metadata includes model name and parameter snapshot.
  • Cost estimates update after each intermediate step.
  • If the rule changes between runs, the audit trail shows the previous and current values.
  • The routing decision appears in the live stream within 200 milliseconds of task detection.

Set Per-Run Cost Limits Tied to Model Choice

Link each model rule to spend caps so high-cost models only run when the task justifies them. The config object stores both the model and the limit in the same place. You can adjust caps without touching the underlying agent code.

  • Research tasks capped at 50,000 tokens
  • Summarize tasks capped at 8,000 tokens
  • Code-gen tasks capped at 120,000 tokens
  • Over-limit tasks pause and enter the approvals inbox
  • Data-extract tasks capped at 25,000 tokens
  • Report-gen tasks capped at 90,000 tokens

Learn more about enforcing per-run cost limits in agent config object.

Maintain Version History for Model Rules

Every edit to model selection rules config creates a new version of the object. You can roll back to a prior version if a new model produces unexpected outputs. The history also records who approved each change and the timestamp of the update.

  • Version 12 added gpt-4o for research tasks
  • Version 13 lowered temperature on code-gen tasks
  • Version 14 introduced fallback model for summarize tasks
  • Version 15 adjusted cost caps for report-gen tasks

Check detect configuration drift in versioned agent configs for steps to surface unintended changes.

Apply Human Review to Model Updates

Changes that affect which model touches real data must pass through the approvals inbox. You review the proposed rule, the expected token impact and a sample output before approving. This step ensures that expensive or less-tested models do not reach production without explicit sign-off.

  • Approve or reject the entire model switch
  • Edit temperature or max tokens inline
  • Require a second reviewer for production agents
  • Attach notes explaining the business reason for the change

Monitor Live Execution Streams

While the agent runs, the command center streams model choice, current token count and estimated cost for each step. You see immediately if a task routes to an expensive model. The stream also flags any deviation from the configured rule so you can intervene before the run completes.

  • Per-step logs list model and parameters
  • Running total updates every 500 tokens
  • Alerts trigger when projected cost exceeds the rule limit
  • Token breakdown separates input and output counts per model

Compare this visibility with manual methods in the article on agent command center vs manual logs for error handling.

Test Rules Before Production Use

Run sandbox validations against the config object to confirm model selection behaves as expected. The test uses sample tasks and records which model each rule selects. Results include simulated token counts so you can verify cost limits before live deployment.

  • Test set includes one task from each category
  • Output shows selected model and parameter values
  • Failures block promotion to the live config
  • Test logs are stored alongside the version history for later audit

Align Model Rules with Compliance Requirements

Model selection rules must also satisfy internal and external compliance obligations. Store compliance tags inside the same config object so auditors can trace which model processed regulated data. This approach reduces the effort needed to produce execution metadata for reviews.

These tags appear in the per-execution logs so you can pull reports without extra tooling.

Conclusion

Place model selection rules inside the same versioned config object that governs prompts, tools and approvals. This keeps every decision traceable and every sensitive action behind human review.

Next steps:

  • Open your current config object and add the first task-to-model mapping
  • Set a token limit for the highest-cost model
  • Route the updated object through the approvals inbox
  • Schedule a test run and review the live token stream
  • Compare results against the prior manual setup
  • Export the version history for your compliance archive

FAQ

How many models can one config object reference?

A single object supports an unlimited number of task-to-model rules as long as each rule stays within the versioned schema.

Does changing a model rule require new approvals?

Yes. Any edit that alters which model executes on real data routes through the approvals inbox before the next scheduled run.

Can I set different parameters per task?

Yes. Temperature, max tokens and top-p values are stored per rule inside the same config object.

Where do token counts appear during execution?

Live visibility streams token usage and cost estimates for the selected model after each intermediate step.

What happens if a model becomes unavailable?

The config object supports a fallback model per task so execution continues without manual intervention.