Skip to content

feat(models): add Model Access page to gate what the endpoint serves - #3015

Open
MuhammadUsamaMX wants to merge 1 commit into
decolua:masterfrom
MuhammadUsamaMX:feat/model-access-control
Open

MuhammadUsamaMX wants to merge 1 commit into
decolua:masterfrom
MuhammadUsamaMX:feat/model-access-control

Conversation

@MuhammadUsamaMX

Copy link
Copy Markdown
Contributor

Problem

Per-model blocking already exists, but it is only reachable from one provider's page at a time, and there is no single place to see what the final endpoint actually serves. With a number of providers connected, /v1/models ends up listing models that were never deliberately curated, and auditing that list means walking every provider page in turn.

What this adds

A Model Access page (/dashboard/model-access, sidebar entry under Providers) that lists every model of every connected provider, split into allowed and blocked:

  • per-model allow/block toggle
  • per-provider Block shown / Allow shown, operating on the currently filtered set — so you can search a term and act on just those
  • search across model id and provider, plus All / Allowed / Blocked filters
  • allowed / blocked / total counts per provider and overall

A Fetch Models button on the provider page, for the providers that did not already have one. OpenAI-compatible providers keep their existing Import from /models; this gives the others the same ability to list what the provider itself reports, using an active account's credentials (/api/providers/<id>/models) rather than only the static registry. Allowed/blocked count badges were added to the same header.

Approach

This deliberately does not introduce a second gating mechanism. /api/models/access reads and writes the same per-provider disabled list (disableModels / enableModels) that /v1/models already filters on, so a model blocked here genuinely disappears from the endpoint and stays blocked across restarts.

New endpoint:

  • GET /api/models/access → { providers: [{ alias, connections, total, allowed, blocked, models[] }], totals }
  • POST /api/models/access → { providerAlias, ids[], action: "block" | "allow" }

Only providers with a connected account are listed, since a model from a provider with no account can never be served anyway.

Testing

Built and run against a live instance with several providers connected (86 models across 5 providers). Round-trip verified against the real endpoint:

  • block a model → it disappears from GET /v1/models
  • allow it again → it comes back
  • blocked counts return to their prior state, no residue left behind

docker build is clean on top of master.

Related

Blocking a model was only reachable from a single provider's page, and there
was no one place to see what the final endpoint actually exposes.

Add a Model Access page listing every model of every connected provider split
into allowed and blocked, with search, filters, per-model toggles and
per-provider bulk actions. Combos are listed too and are now gated by the same
disabled list, so blocking one really removes it from /v1/models.

Add a Playground that fans one prompt out to up to 4 models in parallel and
shows the answers side by side, and a Fetch Models button on the provider page
that loads the provider's own catalogue via an active account (falling back to
the built-in one when a provider exposes no live list).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant