mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-09-21 06:12:17 +03:00
feat: adaptive reasoning effort (auto) — gateway-resolved, per-turn pinned, all harnesses (#13448)
Merged after a maintainer rework that kept every one of @patrykkopycinski's commits intact — including the two refactors you pushed later (extracting the adaptive-effort wiring out of `chatCore.ts` and reading `x-omniroute-effort` inside the wiring module), which were merged into the rework rather than overwritten. **What the rework added:** the adaptive-effort wiring is scoped to OpenAI-dispatch requests only (the claim in `docs/routing` was corrected to match), and `defaultReasoningEffort` was widened to accept `auto` explicitly instead of relying on a loose string. Validated as a combined board first (this PR merged with the 21 siblings of the same wave on the release tip): eslint with the frozen suppressions, typecheck:core, check:open-sse-typecheck, complexity, cognitive-complexity, changelog-integrity, i18n new-key coverage, docs-counts, docs-sync, migration-numbering, provider-consistency and a duplicate-identifier audit all green, plus 176 passing / 0 failing focused node:test cases across the 25 test files the wave touches and the dashboard test under Vitest (2/0). Then re-validated alone on the fresh tip before this merge: conflicts re-resolved, file sizes rebaselined for this PR's own growth, eslint and this PR's focused tests re-run. Thank you — gateway-resolved, per-turn pinned effort is a real feature, and the header contract makes it usable from every harness.
This commit is contained in:
committed by
GitHub
parent
421d1ff912
commit
23c5772ccb
@@ -48,7 +48,17 @@ export interface ModelSpec {
|
||||
// operator strip-by-default a thinks-by-default model (measured: gemini-flash-lite
|
||||
// burns ~277 reasoning tokens on a plain request; `reasoning_effort:"none"` → 0)
|
||||
// without patching every client. See open-sse/services/defaultReasoningEffort.ts.
|
||||
defaultReasoningEffort?: "none" | "low" | "medium" | "high";
|
||||
//
|
||||
// `"auto"` (#13448) is the per-model opt-in into adaptive reasoning effort: the
|
||||
// literal value is injected here exactly like any other level, then
|
||||
// chatCore/adaptiveEffortWiring.ts's wireAdaptiveEffort() recognizes it as an
|
||||
// opt-in marker (never forwarded upstream verbatim) and resolves it to a
|
||||
// concrete low/medium/high from the turn's request-shape signals. Without
|
||||
// "auto" in this union, no operator could configure the per-model opt-in
|
||||
// through the typed catalog at all -- open-sse/services/adaptiveEffort.ts's
|
||||
// priority #3 and the wiring's modelDefaultAuto branch were unreachable
|
||||
// except by a test constructing the body literal directly.
|
||||
defaultReasoningEffort?: "none" | "low" | "medium" | "high" | "auto";
|
||||
}
|
||||
|
||||
const BEDROCK_CLAUDE_ALIASES = (...modelIds: string[]) => [
|
||||
|
||||
Reference in New Issue
Block a user