MentorRoutingStrategy enum
The MentorRoutingStrategy enum of Novior.MentorAgent.Options: How MentorAgent decides, per turn, whether to serve from the cheap MentorOptions.ChatClient or…
On this page
How MentorAgent decides, per turn, whether to serve from the cheap MentorOptions.ChatClient or escalate to the MentorOptions.StrongChatClient (roadmap #11). Routing is active only when a MentorOptions.StrongChatClient is configured; otherwise every turn uses the cheap client. All built-in strategies avoid naive keyword matching on user text.
Definition
Section titled “Definition”Namespace: Novior.MentorAgent.Options. Package: Novior.MentorAgent.
public enum MentorRoutingStrategy
dotnet add package Novior.MentorAgentValues
Section titled “Values”| Value | Number | Description |
|---|---|---|
Custom | 0 | Developer-supplied predicate. Uses MentorOptions.UseStrongModelAsync (preferred, async, sees the whole conversation) or the legacy sync MentorOptions.UseStrongModel. Full control — the escape hatch. This is the default for backward compatibility. |
Semantic | 1 | Embedding-based semantic routing. The latest user message is embedded and compared by cosine similarity against MentorOptions.RoutingComplexExemplars (a small set of "complex/hard" example turns); it escalates to the strong model when the best score reaches MentorOptions.RoutingThreshold. Multilingual, ~free (one embedding), no keywords. Requires MentorOptions.EmbeddingGenerator; without one, routing is disabled (cheap only). |
Classifier | 2 | LLM-as-router. A tiny, constrained classification call (defaults to the cheap client, or MentorOptions.RoutingClassifierClient) labels the turn SIMPLE or COMPLEX and escalates on COMPLEX. Most precise; adds one small LLM call per turn. |
Cascade | 3 | Model cascade / self-escalation. The turn is served by the cheap model first, then a small classifier judges whether the answer fully resolved the request; if not, the turn is re-run on the strong model. Best quality/cost trade-off — it only pays for the strong model when the cheap one actually falls short. On streaming calls it cannot re-run mid-stream, so it pre-decides like MentorRoutingStrategy.Classifier on the input. |
