fix(backend): preserve compatible OpenRouter models#1121
Merged
brunobuddy merged 4 commits intomnfst:mainfrom Mar 14, 2026
Merged
fix(backend): preserve compatible OpenRouter models#1121brunobuddy merged 4 commits intomnfst:mainfrom
brunobuddy merged 4 commits intomnfst:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1121 +/- ##
=======================================
Coverage 99.00% 99.00%
=======================================
Files 224 224
Lines 11845 11869 +24
Branches 3749 3756 +7
=======================================
+ Hits 11727 11751 +24
Misses 26 26
Partials 92 92
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
1 issue found across 5 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/backend/src/database/pricing-sync.service.ts">
<violation number="1" location="packages/backend/src/database/pricing-sync.service.ts:101">
P2: Canonical name collision: an incompatible model's canonical name can shadow a compatible model from a different provider. When both `provider-a/model-x` (incompatible) and `provider-b/model-x` (compatible) exist, `model-x` ends up in `incompatibleNames` and `removeUnsupportedModels` deletes the row that `syncAllModels` just upserted for the compatible model.
Track compatible canonicals and exclude them from the incompatible set.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
OpenRouter-hosted models with vendor-prefixed IDs need to remain available locally, but image-output / non-chat models should not be proposed in Manifest's text model picker. This keeps OpenRouter chat models surfaced while removing incompatible entries like image-preview-only rows from the synced pricing table.
Testing
Summary by cubic
Preserves chat‑compatible OpenRouter models, always creates OpenRouter‑hosted vendor‑prefixed copies with
provider: 'OpenRouter', and filters non‑chat entries while avoiding canonical name collisions during cleanup.New Features
openai/gpt-4o) alongside the canonical entry, withprovider: 'OpenRouter'.OpenRouterprovider models even if not curated; available models include vendor‑prefixed IDs whenopenrouteris active.Bug Fixes
Written for commit 9acb4f3. Summary will update on new commits.
Fixes #1088