feat(mcp): list_provider_models — a provider's whole surface in one call - #318
Open
guillaumegay13 wants to merge 1 commit into
Open
feat(mcp): list_provider_models — a provider's whole surface in one call#318guillaumegay13 wants to merge 1 commit into
guillaumegay13 wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
guillaumegay13
force-pushed
the
feat/list-provider-models
branch
from
August 20, 2026 19:33
521bd06 to
e6fdf09
Compare
Replaces find_models_supporting.
Picking a model on Bedrock or Vertex is not the question the MCP tools
answered. The provider is fixed — that is what the AI credits are tied
to — and the open questions are which models it serves, what each one is
called on the wire, and which parameters each one takes. Answering that
cost one list_models call plus one get_model_params call per model: 57
round trips for Bedrock.
list_provider_models answers it in one. Models that share a parameter
surface share a profile, because a provider's models are far less varied
than their count suggests: Converse normalises Bedrock's 56 models down
to four distinct surfaces. That grouping is what makes the whole
provider fit in a tool result at all — flat, Bedrock is 25.8k tokens
against 4.4k as profiles.
Each row carries the model's wireId and, when tracked, its lifecycle
status, so an agent choosing from this list sees a retirement on the row
it is choosing from rather than only on a separate lookup. The reply
says so when a wireId carries the {scope} placeholder, since a Bedrock
caller has to substitute a routing geography into it before sending.
find_models_supporting goes because the inverse index it offered — which
models expose parameter X — is subsumed once a provider's whole surface
arrives in one call, and four tools is the right budget for an agent's
context. Exporting PROVIDER_ENDPOINTS from modelparams is what lets the
reply name the endpoint the models are served from.
guillaumegay13
force-pushed
the
feat/list-provider-models
branch
from
August 20, 2026 22:06
e6fdf09 to
d20cc30
Compare
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.
What this changes
Adds
list_provider_modelsto the MCP server, and dropsfind_models_supporting.The tools answered "tell me about this model". The question a team with AWS or GCP credits actually has is the other way round: the provider is fixed, and what's open is which models it serves, what each one is called on the wire, and which parameters each one takes. Answering that today costs one
list_modelscall plus oneget_model_paramscall per model — 57 round trips for Bedrock.list_provider_modelsanswers it in one call.Profiles, not a flat dump
A provider's models are far less varied than their count suggests — Converse normalises Bedrock's 56 models down to four distinct parameter surfaces. So models that share a surface share a profile, and the models list points at it. That grouping is what makes a whole provider fit in a tool result at all:
There is one output shape, not a set of modes: an agent that wants bare ids already has
list_models.Shape
{ "provider": "bedrock", "baseUrls": ["https://bedrock-runtime.*.amazonaws.com"], "total": 56, "returned": 56, "truncated": false, "paramProfiles": [ { "id": "p1", "modelCount": 41, "parameterCount": 4, "params": [...], "defaults": {} } ], "models": [ { "model": "bedrock/claude-opus-4-6", "authType": "api_key", "wireId": "{scope}.anthropic.claude-opus-4-6-v1", "profile": "p2" } ], "wireIdNote": "A wireId containing {scope} needs one substitution before you send it…", "docs": "https://modelparams.dev/providers/bedrock" }Profiles are ordered commonest-first, so
p1is the provider's house style. The reply carries each model'swireId, and explains the{scope}placeholder in the response that hands those ids over rather than leaving it to the docs — a Bedrock caller has to substitute a routing geography before sending.Why
find_models_supportinggoesIts inverse index — which models expose parameter X — is subsumed once a provider's whole surface arrives in one call. For anyone pinned to one or two providers by credits, the answer was always within a single provider anyway. Four tools is also about the right budget for an agent's context, and this one earns the slot more.
Lifecycle travels with the row
get_model_paramsgainedstatus/replacement/shutdownOnin #316. Each model row here carries them too — a tool whose whole job is helping an agent choose a model has to show a retirement on the row being chosen from, not only to whoever looks that model up separately.PROVIDER_ENDPOINTSis now exported frommodelparams(additive) so the reply can name the endpoint the models are served from.Type of change
models/)models/, plus a logo)src/, docs, CI)Source
No data change — catalog YAML is untouched. The
{scope}wording matches the existing note inpackages/modelparams-mcp/README.md.Before opening
npm run validateandnpm testpass locally (230 site tests, 30 MCP tests, 77 package tests, tsd type tests)npm run lint,npm run typecheck, and both package builds are clean