mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-13 10:43:43 +03:00
* fix(api): custom-model delete no longer tombstones a same-id synced model DELETE /api/provider-models is addressed by `provider` + `model` alone, so it cannot tell a manually-added custom row from a provider-synced row that shares the same id. It removed both unconditionally and, because the synced removal reported success, wrote `isDeleted:true`. That tombstone is permanent: replaceSyncedAvailableModelsForConnection filters deleted ids out of every re-import via getModelIsDeleted, so the provider can never resync. Model sync keeps reporting `added: N` while the catalog stays empty and /v1/models never lists the model again — even though routing to it still works, which makes the provider look broken only in discovery. Reachable via: eye-hide the synced models (#3782 keeps them in the synced store), manually add custom models with the same ids, then delete those custom models. The originals disappear from the catalog while the UI still lists them. Remove the custom row first and treat its presence as the operator's intent, so only a synced-only delete tombstones. #3199 (deleted models stay dropped) and #3782 (eye-hidden models survive re-sync) are unaffected. Covered by tests/unit/synced-model-delete-custom-sibling-tombstone.test.ts, which drives the real route handler: A fails without this change, B guards the #3199 path. * chore(changelog): rename fragment to the assigned PR number #10228