Skip to content

fix(combos): use provider node prefix alias in combo builder qualifiedModel (#14135) - #14143

Merged
diegosouzapw merged 1 commit into
cheaper-inference:release/v3.8.51from
rafacpti23:fix/combo-custom-provider-alias-14135
Sep 22, 2026
Merged

diegosouzapw merged 1 commit into
cheaper-inference:release/v3.8.51from
rafacpti23:fix/combo-custom-provider-alias-14135

Conversation

@rafacpti23

Copy link
Copy Markdown
Contributor

Summary

Fixes #14135

For custom provider nodes (e.g. openai-compatible-chat-<uuid>) configured with a prefix alias (e.g. of), the combo builder previously used the raw provider ID when constructing qualifiedModel for provider node options, causing:

  1. Combo steps to serialize with the raw node UUID instead of the prefix alias.
  2. Capability and catalog resolution (such as in /v1/models) to fail looking up the canonical prefix.

This change ensures that custom provider nodes (providerVisual.source === "provider-node") with a configured alias use their alias prefix as routingPrefix in getComboBuilderOptions().

Testing

  • Added unit test in tests/unit/combo-builder-custom-provider-alias-14135.test.ts verifying prefix alias qualifiedModel assignment, global model list step building, and manual combo step resolution.
  • Validated with node --import tsx/esm --test tests/unit/combo-builder-custom-provider-alias-14135.test.ts (100% pass).
  • Verified related combo tests pass without regression.

…dModel

Fixes cheaper-inference#14135

Ensure custom provider nodes configured with a prefix alias generate
model options with `qualifiedModel: <alias>/<model>` rather than
falling back to the raw internal database node ID. This ensures
proper routing through the configured prefix and accurate catalog
and capability lookups in /v1/models.
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Solid catch and a clean fix — gating on providerVisual.source === "provider-node" is exactly right, so system providers and the existing opencode special-case keep their current behavior while custom nodes get their configured alias instead of the raw DB UUID. I reverted just this hunk locally to confirm the new test actually fails without it (raw openai-compatible-chat-<uuid>/... instead of of/...), then reapplied it and it passes — good regression coverage. Merging.

@diegosouzapw

Copy link
Copy Markdown
Collaborator

Thanks @rafacpti23 — merging via the release merge-train. Validated in local merge-train (mt-train10c) on the devbox @ train tip 4d841aa1c740bbaa03868dc0a403c62099a99a42 with the 72 sibling PRs of this batch: typecheck:core, file-size, complexity, cognitive-complexity, changelog-integrity green; changed-area node:test 831/831 (0 failing) and vitest 480/482 — the two reds are autoCombo/provider-family-combos.test.ts timing out at 20s, which reproduces on the PURE release tip under the full vitest suite (and is already tracked by the Release-Green issue #13866), so it is inherited, not this batch's. Merged --admin per merge-gates §3/§4/§7.

@diegosouzapw
diegosouzapw merged commit f4d7d8a into cheaper-inference:release/v3.8.51 Sep 22, 2026
7 of 16 checks passed
diegosouzapw added a commit that referenced this pull request Sep 22, 2026
…lidated (Refs #13866)

Both tests were red on the pure release tip and both pin behavior that a
merged PR deliberately changed, so the snapshot is the stale side:

- tests/snapshots/provider/translate-path.json: #14316 moved DeepSeek off the
  Responses API back to Chat Completions (format openai-responses -> openai,
  /responses -> /chat/completions). Regenerated with UPDATE_GOLDEN=1; the diff
  is exactly those three lines, no other provider moved.

- tests/unit/combo-builder-options-route.test.ts: #14143 (fixes #14135) makes a
  provider node with a prefix alias qualify its models as "<alias>/<model>",
  because the raw internal node id never routed. The test still expected the
  node id. Aligned to "gd/gpt-custom", matching the "oc/" assertion the test
  right above already makes for opencode.

Validated: provider-translate-path-golden 3/3, combo-builder-options-route 3/3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants