fix(tui): derive local output budget from route window - #5883
Conversation
|
Thanks @dajiaohuang for taking the time to contribute. This repository is observing a maintainer-managed PR intake gate in dry-run mode, so this pull request is staying open. This note helps maintainers prepare the allowlist before any enforcement is considered. Please read |
|
Thank you for this — you diagnosed #5820 independently and correctly. v0.9.12 shipped the same window/2 reservation for uncatalogued local routes (with the explicit operator cap still winning) as part of a broader route-budget fix, so this branch no longer applies to main. If you see any remaining gap on a real Ollama route after updating, please reopen against main and we'll take it from there. |
Summary
Fixes #5820.
Behavior
For an uncatalogued model on a 32,768-token Ollama route, the automatic output cap is now 16,384 instead of being derived from the 128K fallback and clamped to 30,720. The resulting input ceiling is 15,360 rather than 1,024. No live Ollama process, model, credentials, or provider request is used by the test.
Validation
cargo test -p codewhale-tui route_budget::tests --lib --lockedwith--cap-lints warn: 24 passedcargo check -p codewhale-tui --locked: passed with the repository's strict warning policyrustfmt --check --edition 2024 crates/tui/src/route_budget.rsgit diff --checkThe lint cap was used only for lib-test compilation because three unrelated Windows conditional-test variables are denied as unused at baseline. The normal non-test
cargo checkpassed without that cap.