Verbs
`agentproto models`
text agentproto models [adapter] [--json]
agentproto models
agentproto models [adapter] [--json]Lists every model declared by installed agent adapters, annotating each
with its provider and whether a provider API key is configured (✓
runnable, or ✗ missing key). Prices — when known — come from
@agentproto/model-catalog ($ per 1M input/output tokens).
The point: --model anthropic/claude-opus-4-8 fails at runtime with
"no ANTHROPIC_API_KEY" if you haven't set a key. This surfaces the issue up
front so you pick a model your environment is ready for.
Flags
| Flag | Default | Description |
|---|---|---|
--json | false | Emit structured JSON instead of a table. |
--help, -h | — | Print usage. |
Output
Without --json, prints one adapter block per installed adapter with
its status, then one model per line:
mastra-agent (installed)
✓ anthropic/claude-opus-4-8 anthropic $15/$75 per 1M
✓ openrouter/z-ai/glm-5.2 openrouter $0/$0 per 1M
✗ openai/gpt-4.1 openai $10/$30 per 1M
✗ = no provider key. Set one:
agentproto auth provider set openai <api-key>With --json, emits:
{
"adapters": [
{
"adapter": "mastra-agent",
"status": "installed",
"models": [
{
"id": "anthropic/claude-opus-4-8",
"provider": "anthropic",
"runnable": true,
"inputPer1M": 15,
"outputPer1M": 75
}
]
}
]
}Provider key sources
A model is marked runnable (✓) when its provider has a key available from either:
- The current process environment —
ANTHROPIC_API_KEY,OPENAI_API_KEY,OPENROUTER_API_KEY, etc. - The stored provider key file (
agentproto auth provider set …).
Examples
# All adapters, all models
agentproto models
# One adapter in detail
agentproto models mastra-agent
# Machine-readable
agentproto models --json | jq '.adapters[].models[] | select(.runnable) | .id'See also
auth.md— set provider keys withagentproto auth provider setrun.md— pass--modelto a one-shot turnchat.md— pass--modelto an interactive sessionconcepts/adapters.md— how adapters declare models