Skip to content

test(auto-combo): seed providers for #4235 tier weight-composition tests - #16151

Merged
diegosouzapw merged 1 commit into
cheaper-inference:release/v3.8.52from
shipsfromrio:fix/15306-br-4235
Oct 11, 2026
Merged

diegosouzapw merged 1 commit into
cheaper-inference:release/v3.8.52from
shipsfromrio:fix/15306-br-4235

Conversation

@shipsfromrio

Copy link
Copy Markdown
Contributor

Problem

Two cases in tests/unit/auto-combos-suffixes-4235.test.ts fail deterministically on release/v3.8.52 (base-reds in #15306): createBuiltinAutoCombo for auto/coding:fast and auto/coding:reliable returns DEFAULT_WEIGHTS instead of the ship-fast / reliability-first packs.

The cases seed no provider connections, so their only candidates were the keyless opencode models. Since #15979 an uncataloged model inherits its provider's ToS rating; opencode is "avoid" and excludeTosAvoid defaults to true, so the pool is now empty. On an empty pool virtualFactory returns DEFAULT_WEIGHTS early, before the :fast / :reliable weight overlay runs. Production is correct: #15979 is an intentional ToS guard, and weights on an empty combo never affect routing.

Fix (test only)

  • Both cases call the file's existing seedProviders() first, so the overlay runs on a real pool.
  • Each asserts combo.models.length > 0, so an empty pool fails loudly instead of silently comparing default weights again.
  • The exact deepEqual against MODE_PACKS["ship-fast"] / ["reliability-first"] is unchanged.

Tests

The file passes 9/9 (the two target cases failed before). The ToS suites (tos-provider-alias-15059, first-run-catalog-15059, issue-15059-tos-avoid-auto-default) and the other *suffix* files pass 69/69; the other createBuiltinAutoCombo suites pass 26/26; vitest autoCombo/provider-family-combos passes 18/18.

Refs #15306

⚠️ base-red inherited: #15306

…ht-composition tests

Since cheaper-inference#15979, uncataloged models inherit the provider ToS verdict, so the
keyless opencode pool (tos: avoid) is excluded by the default
excludeTosAvoid=true. With no connections the auto/coding:fast and
auto/coding:reliable pools are empty, and the empty-pool early return in
virtualFactory yields DEFAULT_WEIGHTS before the tier overlay runs.

Seed real provider connections in both tests and assert a non-empty pool
so they keep guarding the tier -> mode-pack weight mapping.

Refs cheaper-inference#15306
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Hi @shipsfromrio — closing this pull request to clear the open queue. The branch fix/15306-br-4235 is kept, so the commits stay. Comment here if it should be reopened.

@diegosouzapw

Copy link
Copy Markdown
Collaborator

Hi @shipsfromrio — reopening this pull request. The close was a mistake, and it is back in the merge queue. The branch fix/15306-br-4235 was kept.

@diegosouzapw diegosouzapw reopened this Oct 10, 2026
@diegosouzapw
diegosouzapw merged commit 884f8fc into cheaper-inference:release/v3.8.52 Oct 11, 2026
42 of 89 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants