Multi-Model Routing for AI Office Agents: How to Choose Models and Calculate Credit Multipliers
This article explains how to route tasks across multiple models in an AI office agent. It covers classifying tasks by complexity, writing routing rules and fallback triggers, estimating credit usage from token counts and model multipliers, reconciling estimates with billing, using off-peak pricing, and the engineering considerations for enterprise deployment, including autoscaling, queuing, degradation, data security, and monitoring.
Decide Which Model Tier a Task Should Use
The first step in multi-model routing is classifying tasks. Classification can be based on the number of steps, input length, and reasoning complexity, not on how many characters the user typed. The table below shows one common way to group tasks. Exact model names depend on the platform you use.
| Task Type | Typical Example | Recommended Tier | Rationale |
|---|---|---|---|
| Short Q&A, format conversion | Rewriting a notice, converting a table to Markdown | Lite or Flash | Fast responses and low cost per call |
| Long-text processing | Summarizing a 50-page contract or organizing a quarter’s meeting minutes | Long-context model | Avoids missing information caused by truncation |
| Multi-step reasoning | Writing an industry analysis from data and generating charts | Pro | Long reasoning chains, where result quality matters more than unit price |
| Code writing and modification | Adding exception handling to an internal reporting script | Pro | Rework costs are high when code fails |
When the input token count exceeds 70% of the platform’s context window, prefer a long-context model, even if the task itself is simple. This ratio is a starting point and should be verified with real tasks.
The validation method is straightforward. Extract 50 to 100 historical tasks from the past two weeks. Run them on both model tiers, have business staff score the results, and record the pass rate and cost per task. If the lower-tier model reaches a 90% pass rate, it can be set as the default tier for that task type.
How to Write Routing Rules
The following is a simplified routing configuration. The meaning of each field is explained below.
{"agent_routing_rules": {"simple_summarization": {"preferred_model": "lite_model","fallback": "flash_model","intent_confidence_threshold": 0.8,"timeout_ms": 30000,"retry": { "max_attempts": 2, "backoff": "exponential" },"cost_limit_credits": 50,"fallback_trigger": { "error_rate_5min": 0.05, "p95_latency_ms": 8000 }},"complex_reasoning_and_code": {"preferred_model": "pro_model","fallback": "pro_model_v2","temperature": 0.2,"timeout_ms": 120000,"retry": { "max_attempts": 2, "backoff": "exponential" },"cost_limit_credits": 500,"fallback_trigger": { "error_rate_5min": 0.05, "p95_latency_ms": 60000 }}}}
The fields work as follows:
intent_confidence_threshold: When intent recognition confidence is below 0.8, the simple-task rule is not applied. The task goes to the default Pro tier, or the user is asked to confirm the task type.timeout_ms: A single call that exceeds this limit is treated as a timeout, which triggers a retry or a switch to the fallback model.fallback_trigger: The fallback model is used only when the error rate over the past 5 minutes exceeds 5%, or when P95 latency exceeds the threshold. This prevents frequent switching caused by occasional fluctuations.cost_limit_credits: The credit limit for a single task. When a task exceeds this limit, execution pauses and the user is asked to confirm.temperature: Use a lower value for report and code tasks to improve output stability.
These values are initial settings. Adjust them based on load test results and business feedback. When a new rule goes live, send 5% of traffic through it first. Compare the pass rate, latency, and cost per task over one week, then decide whether to switch all traffic.
How to Calculate Credit Multipliers
Many platforms use the following estimation formula:
Actual credits used = (input tokens + output tokens) × model multiplier
This formula works well for quick estimates, but keep three points in mind. First, input and output prices often differ between models. If a platform applies a single multiplier, tasks with long outputs will be underestimated. Second, billing rules differ across platforms for cache hits, tool calls, and failed retries. Check the official billing documentation for each case. Third, a multiplier is the platform’s pricing result. It does not fully reflect the real compute difference between models.
The table below shows sample data that illustrates the calculation.
| Scenario | Model | Multiplier | Input Tokens | Output Tokens | Actual Credits |
|---|---|---|---|---|---|
| Meeting minutes summary | Lite | 1 | 1,200 | 400 | 1,600 |
| Same task switched to Pro | Pro | 3 | 1,200 | 400 | 4,800 |
| Same task switched to Flash | Flash | 0.5 | 1,200 | 400 | 800 |
| Pro task retried once after failure (retries are billed) | Pro | 3 | 1,200 | 400 | 4,800 |
The table shows that the same task costs three times as many credits on Pro as on Lite. Suppose a team runs 200 tasks of this type per day and moves all of them to Pro. Daily consumption would increase by (4,800 − 1,600) × 200 = 640,000 credits. This figure helps decide whether tasks should be split into tiers by type.
Reconciliation is a required step. Compare the estimated credits in your logs with the platform bill every week. If the gap exceeds 5%, check for unrecorded cache usage, retries, or tool calls.
Using Off-Peak Discounts
Some platforms lower multipliers during low-traffic hours. This is often called off-peak billing. For example, a platform might set the Lite model’s multiplier from 1.0 to 0.5 on weekdays from 00:00 to 07:00. When you use such discounts, keep the following in mind.
- Schedule batch jobs for discounted hours, such as weekly report generation and historical document archiving. Set a deadline for each job.
- Do not forecast costs using the discounted multiplier alone. Discount rules may change, so keep a 20% buffer in your budget.
- Load patterns during off-peak hours can differ from daytime, and response times may change. For tasks with service level requirements, use the daytime P95 latency as the acceptance standard.
- If some models are rate-limited during off-peak hours, timeouts and failure rates can rise, and service level metrics may drop. Critical workloads should not depend only on off-peak processing.
- Holiday discount rules must be confirmed separately. Do not assume they match weekday rules.
Engineering Considerations for Enterprise Deployment
Elastic scaling: Deploy the routing gateway and business logic layer on a container platform that scales automatically based on QPS. For example, one instance can reliably handle 50 QPS. Scale out when average utilization exceeds 70%, and keep at least two replicas to avoid a single point of failure.
Asynchronous queue: Send long-running Pro tasks to a message queue for asynchronous processing. Set the queue length limit to 1,000. When the limit is reached, return a queued status and the estimated wait time. Set the timeout for a single task to 120 seconds. On the consumer side, use request_id for idempotency checks so that the same request is charged only once.
Graceful degradation: If the primary model fails, switch to the fallback model. If the fallback model also fails, return the most recent cached result or ask the user to try again later. The system must not fail silently.
Data security: Content that contains personal information, contract text, or financial data must be anonymized before it is sent to an external model. Do not store full prompts and outputs in logs. Store only hashes and metadata. Legal and security teams must confirm whether cross-border data transfer is permitted.
Monitoring metrics: Monitor at least the following six metrics:
- P95 latency, measured separately by model and task type.
- Error rate and timeout rate.
- Daily token consumption and credit consumption.
- Multiplier deviation, meaning the difference between estimated credits in logs and billed credits.
- Fallback hit rate. A steadily rising share of fallback calls means the primary model is unstable or the switching thresholds are too strict.
- Daily credit usage per user, to detect abnormal call patterns.
Adjust alert thresholds two weeks after launch, based on the observed baseline.
Conclusion
There are three main takeaways.
- Classify tasks by type first, and send only complex tasks to high-multiplier models. The actual savings depend on your own task data, so measure them.
- Use the platform bill as the source of truth for credit usage. Reconcile it weekly, and record how caching, retries, and tool calls are billed.
- Off-peak discounts and fallback models both change cost and latency. Set up monitoring and a rollback plan before you go live.
Not every team needs multi-model routing. If monthly call volume is low, or all tasks require the same quality level, maintaining a single model may cost less. Decide whether to adopt multiple models after reviewing two weeks of real usage data.
