Umbrella issue to track pluggable in-chat model routing end to end, as requested in #1042.
Design: discussion #897 — select-not-delegate, the framework owns the model call; judge-style policies run on the engine's durable, metered chat path.
Delivered in v1 (#964, merged):
RoutingStrategy SPI and the MODEL_ROUTER resource; Strategies.rules(...) and Strategies.of(...)
- Durable decision persistence and replay (ids
route:<router> / chat:<router>:<candidate>), route-once-per-reasoning-loop
- Fallback through declared candidate order;
ModelRoutingEvent (observability-only) with decision metadata and latency histogram
- Build-time validation (regex compile, null/template checks)
v2 (#1042, in review):
- Framework-managed LLM-as-judge:
Strategies.llm(judgeModel[, promptTemplate]); the engine executes the judge call durably (judge:<router>) with token attribution and events
- Verdicts constrained to candidate names; unparseable/non-candidate replies abstain to the default model; judge failures honor the error-handling strategy;
decision_source recorded
- Plan-time validation of judge references;
ModelRoutingJudgeExample
Follow-ups to track:
Umbrella issue to track pluggable in-chat model routing end to end, as requested in #1042.
Design: discussion #897 — select-not-delegate, the framework owns the model call; judge-style policies run on the engine's durable, metered chat path.
Delivered in v1 (#964, merged):
RoutingStrategySPI and theMODEL_ROUTERresource;Strategies.rules(...)andStrategies.of(...)route:<router>/chat:<router>:<candidate>), route-once-per-reasoning-loopModelRoutingEvent(observability-only) with decision metadata and latency histogramv2 (#1042, in review):
Strategies.llm(judgeModel[, promptTemplate]); the engine executes the judge call durably (judge:<router>) with token attribution and eventsdecision_sourcerecordedModelRoutingJudgeExampleFollow-ups to track:
doc-neededlabeladd_resource(..., MODEL_ROUTER)raises with a clear error; cross-language plan deserialization is already tested)