TECHNOLOGY

LiteLLM Complexity Router preserves selected prompt generation settings

In this article
THE QUICK TAKE

Inspect the upstream payload for each routing tier, including conflicting caller settings and ignore controls; a selected prompt includes more than its text.

LiteLLM v1.111.0-dev.4 fixes generation settings dropped from prompts selected by Complexity Router. The November 15 prerelease includes temperature and output-token limits for the affected chat-completion paths. Choosing the right model tier is only part of routing correctness when the selected prompt also carries a generation contract.

Capture the selected prompt’s full contract

Create two deterministic routing tiers whose prompt templates have distinctive text, temperature and output caps. Capture the request at a harmless provider endpoint. Assert the selected template and settings together. Looking only at the chosen model name misses a route that selects the correct tier but silently substitutes defaults. Use both prompt adapters the application depends on instead of assuming all template backends merge settings identically.

Conflicts expose precedence rules

Submit a caller setting that conflicts with a template setting and another that the template does not specify. The implementation preserves existing precedence, so test the documented winner rather than expecting the caller always wins. This distinction matters for centrally managed prompts: application code may provide a default while a template intentionally constrains output. The fixture should show the resolved payload, not infer precedence from generated text.

Ignoring prompt settings is an intentional case

Exercise the configured control that ignores prompt generation settings. Compare its payload with the ordinary merge path. This guards a deliberate application policy rather than treating all omitted template values as a regression. Keep the switch in the recorded configuration so future operators can explain why identical prompt text reaches a provider with different generation options in two otherwise similar deployments.

Prompt versioning remains a separate check

The PR explicitly leaves duplicate prompt text and prompt-version pinning to a separate issue. Retain a version-identity assertion in the application’s acceptance suite rather than crediting this fix with solving it. After payload checks, evaluate output quality and token usage for the intended tasks. The release establishes parameter preservation, while a changed temperature or output cap can still require application-specific quality review.

Sources

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles