Skip to content

[v3.8.50] feat(combo): add maxContextWindow to contextRequirements (fixes #8777) - #8790

Merged
diegosouzapw merged 3 commits into
cheaper-inference:release/v3.8.50from
Dingding-leo:pr/max-context-window-support
Aug 6, 2026
Merged

diegosouzapw merged 3 commits into
cheaper-inference:release/v3.8.50from
Dingding-leo:pr/max-context-window-support

Conversation

@Dingding-leo

Copy link
Copy Markdown
Contributor

Summary

Fixes #8777.

Adds maxContextWindow support to contextRequirements in combo target filtering and validation schemas.

Changes

  • Validation Schema: Added maxContextWindow (number between 0 and 10,000,000) to comboRuntimeConfigSchema in src/shared/validation/schemas/combo.ts and DEFAULT_COMBO_CONFIG in open-sse/services/comboConfig.ts.
  • Target Filtering: Updated applyContextRequirements in open-sse/services/combo/contextRequirements.ts to filter out targets with context windows exceeding maxContextWindow. Respects contextFilterMode (strict excludes models with unknown limits, lenient includes them).
  • Tests: Added unit & integration test coverage in tests/unit/combo-context-requirements.test.ts and tests/unit/combo/context-requirements-integration.test.ts.

Copilot AI review requested due to automatic review settings July 27, 2026 19:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@diegosouzapw diegosouzapw changed the title feat(combo): add maxContextWindow to contextRequirements (fixes #8777) [v3.8.50] feat(combo): add maxContextWindow to contextRequirements (fixes #8777) Jul 28, 2026
@diegosouzapw diegosouzapw added the deferred-v3.8.50 Adiada para o ciclo v3.8.50 (validacao VPS, refactor, ou escopo grande) label Jul 28, 2026
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Heads-up: this PR is running against a stale base

release/v3.8.49 has moved 93 commits ahead of the base this PR was last built against, and several gate failures that were red on the older base have since been repaired on the branch itself:

Gate class Repaired by
No new ESLint warnings (exit 2 — orphaned suppressions, not a lint violation) #8706, #8831
Fast Quality Gates / check:file-size / Quality Ratchet #8585, #8767, plus the post-merge-train re-pins
Docs Gates (fast-path) (missing Polish API_REFERENCE) #8831
backoff-clamp + compressionDetailNormalizers unit tests #8706

I verified this on a clean checkout of the current tip (3b515d90b3): lint:json --max-warnings 0, check:file-size, check:docs-sync, error-classification.test.ts (24/24) and check-db-rules.test.ts (22/22) all pass with no changes.

Currently failing here:

  • Fast Quality Gates

Please update the branch (the Update branch button, or rebase onto origin/release/v3.8.49) and let CI re-run. That should clear any failure caused by the stale base.

Note this is not a promise that every red disappears — a failure specific to the changes in this PR will survive the rebase, and Build (advisory) is advisory and does not block. Rebasing just removes the noise so what is left is actually yours.

No action was taken on this PR beyond this comment.

@diegosouzapw
diegosouzapw changed the base branch from release/v3.8.49 to release/v3.8.50 July 28, 2026 18:40
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Re-homed to release/v3.8.50: v3.8.49 entered its release freeze, so the branch now belongs to the release captain and development continues on the next cycle. Nothing is wrong with this PR — it just needed a live base. No action needed from you; CI will re-run against the new base.

Adds maxContextWindow support to combo target context filtering and validation schema.
@diegosouzapw
diegosouzapw force-pushed the pr/max-context-window-support branch from dc3b0e7 to 4540a75 Compare August 4, 2026 12:27
diegosouzapw and others added 2 commits August 4, 2026 23:12
…tWindow

Adds a regression test proving that when the new maxContextWindow filter
(#8790) rejects every combo target, resolveComboTargetPipeline surfaces
the existing #8786 context_requirements_exhausted 404 early response
instead of letting an empty orderedTargets[] fall through to the attempt
loop. Verified red-first by temporarily disabling the maxContextWindow
filtering block in contextRequirements.ts.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Heads-up on the issue reference, not on the change itself: this PR says it fixes #8777, but #8777 is about FITNESS_TABLE rot in open-sse/services/autoCombo/taskFitness.ts (dead rows, version-less family patterns, short-pattern collisions). This diff adds maxContextWindow to contextRequirements (open-sse/services/combo/contextRequirements.ts, comboConfig.ts, schemas/combo.ts) and never touches taskFitness.ts — a different subsystem, so it looks like a wrong issue number.

The change itself looks fine and stands on its own; could you update the reference to the issue it actually addresses (or drop the fixes line)? Left as-is, merging this would auto-close #8777 while the fitness-table problem is still open.

For context: I re-triaged #8777 today and confirmed two of its defects with a reproduction test — getStaticFitnessTableScore("solar-pro3") returns 0.95 because the bare o3 pattern matches by substring, and minimax-m2.7 scores below its older sibling minimax-m2.5. So that issue does need its own fix.

@diegosouzapw
diegosouzapw merged commit 8a7b246 into cheaper-inference:release/v3.8.50 Aug 6, 2026
4 of 5 checks passed
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deferred-v3.8.50 Adiada para o ciclo v3.8.50 (validacao VPS, refactor, ou escopo grande)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(backend): static fitness table freezes newer models at legacy scores

3 participants