Model routing for voice agents: requests, turns and sessions

An engineer beside a voice waveform branching toward three compute modules
An engineer beside a voice waveform branching toward three compute modules

A voice agent can choose a capable model and still leave the caller waiting, lose a correction or repeat a booking after a timeout. Model choice becomes an operating decision once requests share a live conversation. For technical teams, a useful routing policy needs clear selection boundaries, measurable quality and timing targets, and rules for what survives a change of model.

What is model routing?

Model routing is the policy that selects which AI model handles a request or task from a pool of candidates. It uses requirements such as capability, expected answer quality, latency, cost and availability. A large language model (LLM) router applies that policy to language-model requests.

For real-time voice agents, the selection also depends on conversation state and the boundary at which a model can change. A model eligible for a new call may be unsuitable halfway through a pending action.

The practical rule is filter for eligibility first, then optimize within the eligible pool. A low price or fast response cannot compensate for missing tool support, an unauthorized data destination or lost conversation context.

Routing has a narrower job than the surrounding infrastructure:

  • Model routing chooses a model for the work.
  • Load balancing distributes work across serving instances or endpoints, potentially for the same model.
  • An AI gateway manages access to model APIs and may host routing, quotas and logging.
  • A mixture-of-experts model routes computation among experts inside one model. That is a different boundary from selecting among independently deployed models.

The voice AI infrastructure still needs speech handling, tool execution and conversation control. Adding a router does not replace those responsibilities.

Decide what the router selects: a request, turn or session

A request is one model invocation. A turn is an interaction that may require several invocations and tool calls. A session is the longer-lived connection and conversation context. These units are related, but they are not interchangeable.

Routing boundaryWhat changesMain constraint
Per requestThe model for a discrete task, such as extraction or planningThe task needs complete input and a result the caller can use
Per turnThe model assigned to the next conversational exchangeHistory, corrections and tool outcomes must remain consistent
Per sessionThe model chosen when a live model session startsReplacing it may require a new connection and state reconstruction

In a speech-to-text, language-model and text-to-speech pipeline, the application can select a language model when issuing each text request. It owns the history and tool messages sent with that request. A single caller turn may still contain several model requests, so per-turn routing needs an explicit rule about whether all of them use the same model.

Another design keeps a persistent voice frontend and routes discrete reasoning or tool-selection tasks to backend models. This separates the speaking session from backend model choice. The backend result still needs a deadline, an output contract and permission checks before any action executes.

Native speech-to-speech sessions have different constraints. OpenAI Realtime, for example, does not allow changing model through session.update. Selecting a different model therefore needs a separate session or handoff path. Its Realtime API contract also limits the history that can be recreated: conversation.item.create cannot populate assistant audio messages.

A text-model router is consequently not sufficient evidence of native audio-session routing. The architecture determines where selection is possible.

How a routing policy chooses an eligible model

We recommend an inspectable policy with hard constraints outside any learned ranking. The router can use predictions to choose among permitted options. It must not predict its way around a capability or authorization requirement.

1. Gate on capability and policy

Maintain a capability record for each approved model and endpoint. Include:

  • Input and output types, such as text or audio, plus the languages required by the workflow.
  • Tool calling, argument schemas and structured-output behavior.
  • Context capacity for the actual history, instructions and tool results.
  • Region, data-handling rules and tenant permissions.
  • Workflow-specific quality and safety acceptance criteria.

Endpoint compatibility covers request syntax; it does not establish equivalent tool behavior or task accuracy. A candidate enters a route only after it meets that route's requirements.

Keep the same constraints during fallback. If no eligible model remains, use a defined hold, human handoff or safe termination path. A budget limit must not silently send sensitive work to an unapproved endpoint.

2. Estimate quality for the task

Capability is specific to the work. Extracting a corrected appointment date, resolving conflicting instructions and choosing a backend function need different evidence. Model size and a general benchmark score are incomplete proxies.

Use workflow outcomes to define quality: the correct date survives a correction, the selected function has valid arguments, and an unauthorized action is blocked. This makes a route's acceptance criteria more useful than a generic label such as “easy prompt.”

If the caller's intent is ambiguous, clarification may be the right next action. Sending the same ambiguity to a more expensive model does not supply missing information.

3. Budget for a useful spoken answer

Model inference is only part of caller-visible delay. The critical path can include detecting the end of speech, transcription, routing, connection setup, model work, tools, speech synthesis and playback buffering. Some stages overlap, so a timed execution record, or trace, is more useful than adding unrelated component averages.

Measure from the caller's end of speech to the useful audible response. An immediate “one moment” can acknowledge a wait, but it does not finish the task. Track it separately.

Compare the median, or P50, with P95, the delay at the 95th percentile. Break results down by task and warm versus cold connections. A route with a better average can still produce unacceptable long waits.

Give the entire turn a deadline. Each routing decision needs the remaining budget, including time reserved for tools and speech. A late fallback cannot spend a fresh full timeout as though the caller had just stopped speaking.

4. Include the cost of unsuccessful work

Per-token price is an input to routing economics. The useful outcome is cost per successful call.

Include router execution, context input, generated output, speech processing, retries, fallback attempts and any additional call duration. Preserve the distinction between a cached input discount and a guaranteed cache hit. Model changes can alter cache reuse and connection costs.

A cheaper request can be more expensive overall when it needs repeated clarification or another model's answer. Rank cost only among routes that meet the workflow's quality and timing requirements.

5. Apply current health and session state

Track health by model, endpoint and region. Provider-wide status alone cannot describe the throttling, timeouts or tail latency experienced by a particular deployment.

A circuit breaker can temporarily remove a failing endpoint, allow a cooldown and admit recovery probes. Use bounded observation windows so one error does not cause persistent route changes. Separate transport failures from invalid requests, poor answers and safety refusals. A refusal is not permission to search for a model that will bypass the policy.

Session affinity means preferring the model already serving a conversation. It can avoid unnecessary changes, but eligibility and health take precedence. Require a meaningful expected benefit after switching costs before moving a healthy session. Keep affinity separate from state storage: remembering a model identifier does not preserve the conversation.

Start with rules; add learned routing where it earns its cost

Deterministic rules are a useful starting point when workflow stages are known. They are straightforward to inspect; assign a reason code to each branch. Dynamic model routing can use those rules, a learned predictor or both.

StrategySelection methodVoice-specific tradeoff
RulesMap known task types and constraints to approved modelsLow decision overhead; unusual requests need a safe default
Learned routingPredict model quality or task difficulty before generationAdds inference overhead and depends on representative labels
CascadeGenerate with one model, escalate after evaluating its outputRepeated generation consumes the same caller's time budget

The RouteLLM research demonstrates learned selection between a stronger and weaker model using preference data and a routing threshold. It selects one answer-generating model per query. It does not establish a speech-session switching contract or predict savings for a particular voice workload.

A learned score needs calibration against the tasks it will receive. Keep a versioned threshold and a known-safe default for uncertain classifications or predictor failures. The default must still pass current eligibility and health gates. Treat an answer's self-reported confidence as a signal that needs calibration, rather than proof of correctness.

For cascades, finish the escalation decision before committing the answer to speech or executing an action. Once the caller has heard a statement, a second model cannot silently replace it.

Example: routing a scheduling conversation

Consider a scheduling agent with an application-owned booking record and a text-model backend. Its policy separates model selection from booking execution.

EventSelection policyExecution boundary
Caller gives a straightforward date preferenceUse the approved extraction routePreserve the original utterance and normalized date
Caller corrects the date and adds conflicting constraintsUse the route qualified for that task, or ask for clarificationResolve the conflict before submitting a booking
Selected endpoint times out before any output or actionChoose a healthy eligible fallback if the deadline permitsRecord the attempt and pass the same task state
Booking submission times out with an unknown resultReconcile the booking outcome before further model-driven actionA model change cannot establish whether the booking succeeded

The final row is a business-system uncertainty. The route can choose who reasons next, but it cannot replace authoritative booking state.

Make model changes safe for the conversation

Model selection and recovery belong to one coherent execution policy. The agent runtime is responsible for turning the selection into controlled execution with consistent tool and conversation state.

Keep an application-owned handoff record containing:

  • Current intent, confirmed facts and caller corrections.
  • Permissions, consent state and applicable workflow rules.
  • Completed tool actions and their authoritative results.
  • Pending actions, stable action identifiers and uncertain outcomes.
  • What the caller actually heard, including interrupted speech.

Recreate only the state the target API can ingest. A text summary cannot promise lossless transfer of audio context.

Generated output and heard output can differ. OpenAI's interruption handling makes playback responsibilities transport-specific. With a WebSocket connection, the application manages playback and reports the heard duration for truncation. A handoff must preserve that distinction rather than replaying all generated speech as conversation history.

An ordered fallback policy can prefer another healthy endpoint for the same model before selecting an alternative model. Every step must remain eligible, fit the deadline and respect any output or action already committed.

Assign retry ownership to one layer and enforce a finite attempt budget across the application, gateway and software development kit (SDK). Nested retries can multiply both load and caller delay. Amazon's retry engineering guidance explains that timeouts do not prove side effects did not occur and that retries can amplify overload.

For bookings or payments, use stable action IDs and idempotent execution, where repeating the same action cannot create a duplicate effect. Reconcile uncertain tool outcomes before replay. A new model must not repeat an action simply because the previous model's response is missing.

Evaluate the routing policy against one model

A single qualified model is the baseline. Routing earns its additional complexity only when the complete policy improves the required tradeoff.

  1. Fix the comparison conditions. Keep scenarios, prompts, tools, transport and scoring criteria equivalent between the baseline and routed path.
  2. Include difficult conversation slices. Cover corrections, long histories, required languages, noisy audio, interruptions, tool calls, cold connections and endpoint failures. Repeat scenarios to expose variation.
  3. Score outcomes and operating cost together. Record task completion, tool and argument correctness, duplicate actions, recovery success, useful-answer P50/P95 and cost per successful call.
  4. Explain each selection. Record policy version, routing boundary, eligible candidates, selected model, reason code, remaining deadline and fallback history. Apply access and retention controls to conversation data.
  5. Roll out with limits. Use a bounded traffic cohort, category-specific regression thresholds and a rollback path to the qualified baseline.

Human listening belongs alongside automated scoring. A correct transcript alone cannot establish that an interruption was handled well or that the caller heard the final answer.

When a narrow workload already meets quality, timing and cost targets with one model, retaining that configuration can be the simpler operating choice.

Where our managed runtime fits

We help technical teams build and run production voice AI agents through a managed runtime, REST APIs and a web application. Model configuration sits alongside speech handling, tools and call execution.

Our agent configuration includes a provider, model and generation options. A customer-controlled call-start webhook can replace the complete agent configuration for one call, including model settings. That is a call-initialization boundary; it should not be treated as automatic per-turn model selection.

For task separation, our optional enhanced tooling can use a separate tool-calling model. It adds model calls and increases LLM usage cost. Custom compatible endpoints require the OpenAI Chat Completions format; compatible syntax does not promise identical behavior.

Our completed-call inspection exposes transcripts, model exchanges, tool calls, timelines and latency breakdowns. Audio playback depends on recording configuration. These records support comparing agent configurations against the same workflow outcomes.

Our platform fits teams that want configurable models inside a managed voice runtime. A general-purpose model proxy has a different job. Per-turn routing and cross-provider failover require an explicit integration contract; agent-level configuration alone does not establish either capability.

Start with our model configuration guide to build a controlled Dasha evaluation around your call workflow.

Share

Subscribe

Sign up to our e-mail list to get the best of the Dasha blog sent directly to your inbox.

We use cookies for functional and analytical purposes. Please refer to our Privacy Policy for details.