Repository navigation
feat(sse): per-request Auto-Combo controls (X-OmniRoute-Mode / X-OmniRoute-Budget) — closes #6023 #6024 #6025 - #6057
Merged
diegosouzapw merged 5 commits intoJul 4, 2026
Conversation
…mniRoute-Budget headers Steer an `auto` combo on a single request without mutating its stored config: - X-OmniRoute-Mode (#6024/#6025): friendly presets (fast/balanced/quality/cheap/ reliable/offline) or a raw mode-pack name; balanced/default force default weights. - X-OmniRoute-Budget (#6023): hard per-request USD cost ceiling. Pure resolvers in open-sse/services/autoCombo/requestControls.ts feed the engine's existing config.modePack / config.budgetCap inputs (no engine changes). Threaded via relayOptions (chat.ts) into handleComboChat's auto path; unknown/garbage values are ignored so saved config is preserved. Docs: docs/routing/AUTO-COMBO.md. Closes #6023, #6024, #6025. Regression guard: tests/unit/auto-combo-request-controls-6024.test.ts (5).
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This was referenced Jul 3, 2026
…combo-request-controls-6022 # Conflicts: # open-sse/services/combo.ts
…combo-request-controls-6022
…combo-request-controls-6022
… keep only the auto-combo-controls entry
tkgo11
pushed a commit
to tkgo11/OmniRoute
that referenced
this pull request
Sep 23, 2026
…Route-Budget) — closes cheaper-inference#6023 cheaper-inference#6024 cheaper-inference#6025 (cheaper-inference#6057) Per-request Auto-Combo controls (X-OmniRoute-Mode / X-OmniRoute-Budget). Integrated into release/v3.8.44.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds per-request Auto-Combo routing controls via two response-safe request headers, so a caller can steer an
autocombo on a single request without mutating its stored config.X-OmniRoute-Modefast,balanced,quality,cheap,reliable,offline) or a raw mode-pack name (ship-fast,cost-saver,quality-first,offline-friendly,reliability-first)balanced/default→ default weights. Unknown values ignored.X-OmniRoute-BudgetWhy this shape
The auto-combo engine already consumes
config.modePackandconfig.budgetCap(weights resolution + budget filtering with cheapest-fallback both already exist inengine.ts). The only gap was a per-request entry point. So this PR adds:resolveRequestModePack/parseRequestBudgetCapinopen-sse/services/autoCombo/requestControls.ts(no engine changes).src/sse/handlers/chat.ts, threaded throughrelayOptions.combo.tsauto path: request header overrides stored config for that request only; absent/invalid header preserves the combo's saved config.Scope note
This closes the input-side children of umbrella #5811 (#6023 budget-cap, #6024 latency-vs-quality presets, #6025 mode-pack header). The remaining umbrella child #6022 (
X-OmniRoute-Decisiontrace response header) is a separate output-side threading job (combo selection → chatCore response-header builders) and is intentionally not in this PR. #6010 (fastest routing + MCP tool) already shipped in #6011.Tests / validation (Hard Rule #18)
tests/unit/auto-combo-request-controls-6024.test.ts(5) — presets, aliases, raw pack names, balanced→default, unknown-ignored, budget parse/reject. Green.typecheck:coreclean ·check:cyclesclean ·check:docs-syncclean · eslint clean on touched files ·auto-combo-engine+auto-combos-suffixes-4235suites green.Docs:
docs/routing/AUTO-COMBO.md→ new "Per-Request Controls (headers)" section.