Generate cheapest-first routing
modelfinder_generate_routingGenerate a cheapest-first routing.json and LiteLLM proxy config from eval results, with quality guards and a personal-data policy to create fallback chains for API errors.
Instructions
Turn a finished eval run (results.json object) into a cheapest-first routing.json, with quality guards and a personal-data policy, plus a LiteLLM proxy config whose fallbacks fire on API errors only (it does not enforce the quality guards or personal-data policy). Use after modelfinder_rank_eval_results when the user wants a fallback chain. Read-only and local: no network calls, no files written. Nothing is deployed and the user's active model is not changed; returns both files as text, the model chain and notes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | Explicit model order (candidate ids), overriding cost order. | |
| guards | No | Checks applied to every production reply; a failure escalates to the next model. | |
| results | Yes | The full results.json object written by eval_models.py. | |
| pii_policy | No | block: never send prompts with personal data or secrets; warn: send and report; off: no check. | warn |
| response_format | No | markdown (default) for a readable summary, json for the full machine-readable result. | markdown |
| include_unknown_cost | No | Append passing models whose price is unknown. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | Yes | ||
| notes | Yes | ||
| routing_json | Yes | ||
| litellm_config_yaml | Yes |