mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-26 18:02:17 +03:00
buildStaticProviderEntry() keyed static-catalog combo entries with opts.providerId (the OC-gate-prefixed id, e.g. "opencode-omniroute") instead of opts.omnirouteProviderId (the bare server-facing id, "omniroute") that the dynamic provider.models() hook already uses per #6859. OC dispatches the static models-map key verbatim as the `model` field of the outbound request, so a bare-slug combo key doubled up to "opencode-omniroute/opencode-omniroute/<slug>" and OmniRoute's parseModel() resolved credentials for the nonexistent provider "opencode-omniroute" instead of "omniroute". Regular models were unaffected because their raw ids already contain a slash, skipping the prefixing branch entirely. Swap the buildComboKey() call to use opts.omnirouteProviderId, mirroring the dynamic hook. Adds a permanent regression test to provider-id-routing.test.ts and aligns the pre-existing hardcoded "opencode-omniroute/<combo-slug>" assertions in config-shim.test.ts that had codified the buggy prefix. Co-authored-by: Fábio Silva <13762289+fabioluissilva@users.noreply.github.com>