Repository navigation
feat(catalog): per-key model selectors and metadata field patches - #12
Open
wignerStan wants to merge 5 commits into
Open
wignerStan wants to merge 5 commits into
wignerStan wants to merge 5 commits into
Conversation
wignerStan
force-pushed
the
feature/model-catalog-policy
branch
from
September 8, 2026 13:04
6bdc7ac to
0d3b6d4
Compare
wignerStan
marked this pull request as ready for review
September 10, 2026 05:24
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.
Motivation
Different API keys may need different visible
/v1/modelscatalogs, including stable aliases, model-family allow/deny rules, and corrected advertised metadata. The key-policy plugin is the right place to define that per-key view.This feature uses the model-list response-interceptor support proposed in the companion CLIProxyAPI pull request: router-for-me/CLIProxyAPI#5552
Changes
catalog_groupsselected by downstream policy key IDinclude_modelsandexclude_modelswith exact IDs or one trailing*prefix wildcardpatchinto every retained entryremovemodelsentries for cloning a real CPA source model, exposing an alias, and applying model-specific overridesdata[]and Codex/Pimodels[]catalog shapesallow_models_endpointas the coarse access gateExample
Semantics
*are acceptedid/sluginclude_unlisted: trueincludes all source entries while still applying group patches, removals, and exclusionsValidation
The final tree was produced through Git blob/tree operations and a temporary self-removing action, then squashed to one commit. It passed:
go test ./...go vet ./...