Routing Studio
Suggest a Rule From Corrections
Generate a safe regex rule from a cluster of recent routing corrections.
POST
Suggest a Rule From Corrections
Generates a single suggested rule derived from the caller’s recent corrections for a given mode. Two-tier:Documentation Index
Fetch the complete documentation index at: https://docs.hitheo.ai/llms.txt
Use this file to discover all available pages before exploring further.
- Deterministic first. A pure helper extracts the highest-DF content tokens across the cluster’s prompts and assembles a safe
\b(token1|token2|…)\bpattern. Vendor-name-scrubbed. - LLM fallback. If the deterministic helper returns nothing (no surviving tokens), Theo asks an internal classifier model for a single regex that matches the sample prompts. Output is re-scanned for vendor names and compiled before being trusted. A fallback that fails either check returns
404so no unsafe rule ever escapes.
PATCH /api/v1/routing-preferences/{id}.
Authentication
Requires a Bearer token with thebilling API key scope.
Body
The Theo mode whose correction cluster you want a rule for.
Request Examples
curl
Response
confidence is 0.88 when the deterministic helper produced the pattern, 0.78 when the LLM fallback did.
Errors
400 routing_suggest_below_threshold— Cluster for the requested mode has fewer corrections than the cluster threshold.404 not_found— No cluster exists forexpected_mode, or no safe rule could be derived from the available samples.
Suggest a Rule From Corrections
