Skip to content

fix(api): preserve custom-node combo catalog metadata after builder saves - #15668

Merged
diegosouzapw merged 7 commits into
diegosouzapw:release/v3.8.52from
ekinnee:fix/custom-node-combo-metadata
Oct 7, 2026
Merged

diegosouzapw merged 7 commits into
diegosouzapw:release/v3.8.52from
ekinnee:fix/custom-node-combo-metadata

Conversation

@ekinnee

@ekinnee ekinnee commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Restore /v1/models metadata for builder-saved custom-provider combo members whose providerId is the node UUID and whose model uses its public prefix. Recognize only a prefix whose existing winner map selects that same node, then let the existing resolver strip one prefix. Connection identity, reserved-prefix rules, and collision winner selection remain intact.

For example, providerId: "openai-compatible-chat-…" with model: "cliproxy-direct/gpt-5.6-luna" now publishes the direct model's limits, modalities, and reasoning tiers.

The prefix normalization is a small helper in catalogProviderMaps.ts, keeping the resolver within the existing complexity budget. No migration, persisted combo rewrite, feature flag, suppression, or baseline change is included. Runtime combo-context aggregation outside /v1/models remains outside this repair.

Related Issues

Validation

Candidate: e598f89fa8c27bc7c192a513b3ab565d153f5bcf. Landed upstream changes through 8ad6b1c46eae were merged without rewriting PR history. The net PR diff remains four files: two production catalog files, the existing regression test file, and the changelog fragment.

  • Change type: other — model catalog metadata / combo target resolution.
  • Production-code changes include an automated regression.
  • Focused checks and independent read-only source review completed.
  • Full repository CI, coverage, and production build — external failures/pending checks; this is not a merge-ready claim.

Final local evidence, including a fresh lockfile install:

  • APP_LOG_TO_FILE=false DISABLE_SQLITE_AUTO_BACKUP=true node --import tsx/esm --import ./open-sse/utils/setupPolyfill.ts tests/unit/models-catalog-combo-metadata.test.ts — 14 passed. The original implementation's recorded red proof was combo context 400000 versus direct context 1050000; the regression now passes.
  • APP_LOG_TO_FILE=false DISABLE_SQLITE_AUTO_BACKUP=true node --import tsx/esm --test tests/unit/models-catalog-custom-node-prefix.test.ts tests/unit/combo-builder-custom-provider-alias-14135.test.ts tests/unit/combo-context-prefix-resolution.test.ts tests/unit/12058-models-catalog-canonical-self-aliased.test.ts — four files passed.
  • APP_LOG_TO_FILE=false npm run test:vitest — 54 files / 494 tests passed.
  • npm run typecheck:core — passed.
  • ESLint on the two changed production files and regression file, using the repository's existing suppressions and --pass-on-unpruned-suppressions — passed; no suppressions changed.
  • npm run check:complexity-ratchets -- --base-ref 8ad6b1c46e — passed: zero new cyclomatic or cognitive violations. The previous CI's genuine PR regression (getComboTargetModelId complexity 17, cap 15) is repaired.
  • npm run check:file-size -- --base-ref 8ad6b1c46e — production and test file-size ratchets passed.
  • Prettier, whitespace checks, and commit hooks passed without bypass flags. Independent review found no actionable P0–P2 defects in the final scoped diff.

The broad local native-unit/full-lint attempts were stopped after the operator narrowed this task to focused PR readiness. An earlier broad attempt also exposed missing packages in reused node_modules; npm ci repaired that environment before the final focused checks. No full native-suite, full lint, coverage-floor, deployment, or build pass is claimed.

Tests Added Or Updated

tests/unit/models-catalog-combo-metadata.test.ts builds real global-picker and manual-entry steps, persists them in an isolated database, and verifies direct-model parity for context/output limits, modalities, and reasoning tiers. It also covers legacy UUID qualification and rejects foreign-prefix reasoning metadata. Database handles are closed in teardown.

Coverage Notes

No coverage baseline or suppression changed. The full coverage gate remains hosted CI validation; no passing 60% floor is claimed.

Reviewer Notes

Ready to wait for external repairs; do not merge while required checks are red.

Current-head logs, refreshed after the push:

Next trigger: relevant upstream release/base repairs and companions land, or current-head CI identifies a new failure in this PR's changed files. Then sync the necessary landed changes once and refresh focused/CI evidence. General release-branch cleanup stays with its existing owners. No merge authorization has been given.

@diegosouzapw
diegosouzapw merged commit 9979ed5 into diegosouzapw:release/v3.8.52 Oct 7, 2026
45 of 97 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