feat(providers): centralize provider model capability config#5774
feat(providers): centralize provider model capability config#5774rdself wants to merge 9 commits into
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
diegosouzapw
left a comment
There was a problem hiding this comment.
Really nice piece of work, @rdself — the centralization is clean and the test coverage is extensive. I want this in. A few asks before merge:
- [Rule #16] PR description. Please remove the sentence crediting AI tools ("…cross-review with Claude Opus 4.8 and Codex 5.5…") — we don't advertise AI authorship in PR bodies / commits / CHANGELOG. Human reviewers and co-authors are of course welcome to be credited.
- [CHANGELOG] This adds user-visible surface (the capability-editing UI,
POST /api/provider-models/reset, capability-override persistence) and changes routing semantics, so it needs an entry under[3.8.43]. - [title] It's a refactor + feature + intentional behavior changes, so please retitle
refactor(providers): …→feat(providers): …. - [please note them in the description] I verified these are deliberate and I'm good with them — just document them so future readers/users know they're intentional rather than regressions:
- max-effort: unknown (
null) support now passesmaxthrough instead of normalizingmax → xhigh(upstream gateways apply their own mapping); - targetFormat: a saved DB override now wins over the static registry entry;
- Antigravity reasoning: the legacy
REASONING_UNSUPPORTED_PATTERNSdeny-list is replaced by registry-drivensupportsReasoning, enabling reasoning for models it previously blocked.
- max-effort: unknown (
Once the Rule #16 line is gone, the CHANGELOG entry is added, and the title is feat, I'll merge. Thanks for the careful work here.
|
@diegosouzapw I have addressed the requested changes: removed the Rule #16 line from the PR description, added the [3.8.43] CHANGELOG entry, retitled the PR to Could you please take another look and merge if everything looks good? |
|
@diegosouzapw I resolved the latest conflicts by merging the current Could you please re-review and merge as soon as the new GitHub checks are green? This PR has a broad conflict surface, so getting it in soon would avoid another round of conflict resolution. |
3b1e239 to
4ea7963
Compare
|
@diegosouzapw This branch has now been rebased onto I also re-ran the relevant local validation after the rebase: |
02c6e9a to
87b0660
Compare
|
Hi @diegosouzapw, I have rebased and resolved the latest conflicts again. Since this PR keeps picking up new conflicts as the release branch moves, could you let me know when it might be possible to merge, or if there is anything else blocking it? Thanks. |
87b0660 to
bc63fc0
Compare
|
Thanks @rdself — this is a genuinely large and valuable refactor (centralizing provider model-capability config, ~281 files touched incl. hot-path |
|
@rdself — first, thank you for the persistence here, and for rebasing this again and again. That effort is exactly why I don't want to keep putting you through it. You already put your finger on the real problem: "this PR keeps picking up new conflicts as the release branch moves." A ~280-file refactor across the routing/translation hot path can't realistically win a rebase race against a live release branch — every merge into So rather than leave you rebasing indefinitely, I'm closing this and opening #6117 to track the refactor for the 3.9.0 cycle. This is deferred, not rejected — the work is wanted. When the 3.9.0 release branch opens (a stable base that won't move under you), please re-open a focused PR against it and I'll give it the review window it deserves. If you're open to it, staging the diff (registries first, then hot-path adoption) would de-risk the merge a lot. Really appreciate the contribution — see you in 3.9.0. 🙏 |
Summary
This PR centralizes the provider model source of truth that was previously scattered across provider registries, routing helpers, translators, catalog endpoints, and UI-specific compatibility code. All provider models, model lists, and capability metadata are now consolidated into a single provider-first file:
open-sse/config/providers/sharedModels.ts.At a high level, the shared file is organized like this:
Providers import these shared model lists into their registry entries, while still preserving provider-specific capability differences when the same model ID is served by different upstreams.
The new provider-first model configuration structure groups models by provider and supports the full set of shared capability and limit fields used by OmniRoute, including context and output limits, vision, tool calling, reasoning/thinking support, xhigh/max effort support, default thinking budget metadata, target format metadata, and compatibility options. This makes model metadata maintenance consistent across all providers and significantly reduces the cost of adding or updating provider model catalogs.
It also adds user-overridable model capability configuration with matching dashboard UI, including explicit
null/true/falsestates and reset-to-synced-baseline behavior. Custom/imported models can now carry the same capability metadata as built-in provider models without being overwritten by future syncs.This has been reviewed with particular attention to preserving existing request behavior. The intended scope is to centralize model capability metadata and expose it for editing, with only the explicit behavior notes below treated as intentional semantic changes.
Because this touches a broad set of providers and model capability call sites, it would be best to merge it before additional provider/catalog PRs land and create another large conflict surface. @diegosouzapw
Main Changes
Behavior Note
Capability values intentionally remain tri-state where applicable:
nullmeans unknown,truemeans explicitly supported, andfalsemeans explicitly unsupported. Unknown values are not converted into unsupported defaults.Intentional semantic changes documented for reviewers and future maintainers:
null) support now passesmaxthrough instead of normalizingmaxtoxhigh, so upstream gateways can apply their own mapping.REASONING_UNSUPPORTED_PATTERNSdeny-list is replaced by registry-drivensupportsReasoning, enabling reasoning for models it previously blocked.Validation
npm run typecheck:corenpm run lintnpm run check:file-sizenpm run check:docs-allnpm run build