# Interface CompositeRouterStats

Router statistics for observability.

interface CompositeRouterStats {
totalDecisions: number;
decisionsPerCli: Readonly<Record<CliName, number>>;
avgDecisionTimeMs: number;
budgetRejectionRate: number;
preferenceStats?: {
enabled: boolean;
hasSufficientData: boolean;
dataPointCount: number;
strongModelPreferenceRate: number;
};
banditStats: readonly {
name: string;
pullCount: number;
avgReward: number;
}[];
latencyStats?: LatencyTrackerStats;
routingMemoryStats?: RoutingMemoryStats;
}

- Defined in packages/nexus-agents/src/cli-adapters/composite-router-types.ts:213

##### Index

### Properties

totalDecisions
decisionsPerCli
avgDecisionTimeMs
budgetRejectionRate
preferenceStats?
banditStats
latencyStats?
routingMemoryStats?

## Properties

### `Readonly` totalDecisions

totalDecisions: number

Total routing decisions made

- Defined in packages/nexus-agents/src/cli-adapters/composite-router-types.ts:215

### `Readonly` decisionsPerCli

decisionsPerCli: Readonly<Record<CliName, number>>

Decisions per CLI

- Defined in packages/nexus-agents/src/cli-adapters/composite-router-types.ts:217

### `Readonly` avgDecisionTimeMs

avgDecisionTimeMs: number

Average decision time in ms

- Defined in packages/nexus-agents/src/cli-adapters/composite-router-types.ts:219

### `Readonly` budgetRejectionRate

budgetRejectionRate: number

Budget filter rejection rate

- Defined in packages/nexus-agents/src/cli-adapters/composite-router-types.ts:221

### `Optional` `Readonly` preferenceStats

preferenceStats?: {
enabled: boolean;
hasSufficientData: boolean;
dataPointCount: number;
strongModelPreferenceRate: number;
}

Preference routing statistics

#### Type Declaration

- ##### `Readonly` enabled: boolean

  Whether preference routing is enabled

- ##### `Readonly` hasSufficientData: boolean

  Whether sufficient data for preference routing

- ##### `Readonly` dataPointCount: number

  Total preference data points collected

- ##### `Readonly` strongModelPreferenceRate: number

  Strong model preference rate

- Defined in packages/nexus-agents/src/cli-adapters/composite-router-types.ts:223

### `Readonly` banditStats

banditStats: readonly { name: string; pullCount: number; avgReward: number }[]

LinUCB arm statistics

- Defined in packages/nexus-agents/src/cli-adapters/composite-router-types.ts:234

### `Optional` `Readonly` latencyStats

latencyStats?: LatencyTrackerStats

Latency tracking statistics (Issue #361)

- Defined in packages/nexus-agents/src/cli-adapters/composite-router-types.ts:236

### `Optional` `Readonly` routingMemoryStats

routingMemoryStats?: RoutingMemoryStats

Routing memory statistics (Issue #463)

- Defined in packages/nexus-agents/src/cli-adapters/composite-router-types.ts:238