Skip to content

RoutingContext

Defined in: src/models/routing/strategy.ts:17

Read-only inputs supplied to a routing strategy.

readonly messages: Message[];

Defined in: src/models/routing/strategy.ts:19

Fresh copy of the messages for this strategy ask.


readonly systemPrompt?: SystemPrompt;

Defined in: src/models/routing/strategy.ts:21

Fresh copy of the system prompt for this strategy ask.


readonly toolSpecs: ToolSpec[];

Defined in: src/models/routing/strategy.ts:23

Fresh copy of tool specifications for this strategy ask.


readonly candidates: readonly RoutingCandidate[];

Defined in: src/models/routing/strategy.ts:25

Stable configured candidate instances.


readonly invocationState: Readonly<InvocationState>;

Defined in: src/models/routing/strategy.ts:27

Live invocation state, exposed as read-only.


readonly attempts: readonly RoutingAttempt[];

Defined in: src/models/routing/strategy.ts:29

Chronological attempts made during this invocation.


readonly invocationContext?: InvocationContext;

Defined in: src/models/routing/strategy.ts:31

The request this routing decision runs for, if any; a nested call that joins it adds to the request’s usage, but the request’s limits don’t apply.