Repository navigation
fix(combos): use provider node prefix alias in combo builder qualifiedModel (#14135) - #14143
Conversation
…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.
|
Solid catch and a clean fix — gating on |
|
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 |
f4d7d8a
into
cheaper-inference:release/v3.8.51
…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.
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 constructingqualifiedModelfor provider node options, causing:/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 asroutingPrefixingetComboBuilderOptions().Testing
tests/unit/combo-builder-custom-provider-alias-14135.test.tsverifying prefix alias qualifiedModel assignment, global model list step building, and manual combo step resolution.node --import tsx/esm --test tests/unit/combo-builder-custom-provider-alias-14135.test.ts(100% pass).