Gateway CLI
Use provon gateway to manage AI Gateway provider keys, model bindings, routing, guardrails, and observability settings. Runtime inference calls (/v1/chat/completions, /v1/responses, /v1/messages) use gateway:invoke; the management commands on this page require gateway:manage.
Prerequisites#
- Selected project and authenticated credential.
- Management operations with a credential holding
gateway:manage. - For
providers test, the upstream endpoint reachable from the CLI machine or server runtime.
Status#
Show the Gateway capability matrix and configured providers:
provon gateway statusProviders#
List And Inspect#
provon gateway providers list
provon gateway providers list --provider openai --include-disabled
provon gateway providers get <key-id> --include-disabledCreate A Built-in Provider Key#
provon gateway providers create \
--provider openai \
--display-name "OpenAI production" \
--api-key "$OPENAI_API_KEY" \
--priority 1Optional flags: --base-url, --enabled, --priority <n>, --timeout-ms <n>.
Create A Custom Provider#
Add --custom with a project-defined provider id and either an exact endpoint URL or a base
URL:
provon gateway providers create \
--custom \
--provider internal-kimi \
--display-name "Internal Kimi" \
--driver openai-compatible \
--endpoint-url "https://models.example/custom/chat" \
--responses-mode bridge-chat-completions \
--api-key "$KIMI_API_KEY"--endpoint-urlis used as-is;--base-urlappends the driver's default Chat Completions path.--driverdefaults toopenai-compatible.--responses-modeacceptsdisabled(default),native, orbridge-chat-completions. Exact-URL native mode additionally requires--responses-endpoint-url.
Test a candidate connection before saving:
provon gateway providers test \
--provider internal-kimi \
--endpoint-url "https://models.example/custom/chat" \
--model kimi-2.7-code \
--api-key "$KIMI_API_KEY"test requires --provider, --endpoint-url, and --model; use --auth-header <name> to
send the key in a custom header, or --no-auth for an unauthenticated endpoint.
Update, Enable, Disable, Reorder, Delete#
provon gateway providers update <key-id> --display-name "New name"
provon gateway providers update <key-id> --api-key "$NEW_KEY"
provon gateway providers update <key-id> --enabled
provon gateway providers update <key-id> --disabled
provon gateway providers set-enabled <key-id> true
provon gateway providers set-enabled <key-id> false
provon gateway providers reorder <key-id-1> <key-id-2> <key-id-3>
provon gateway providers delete <key-id>update requires at least one field; empty input fails with gateway.empty_update.
Model Bindings#
Bind a Gateway model to an upstream model on a provider key:
provon gateway providers bind-model <key-id> \
--gateway-model-id gpt-4o \
--upstream-model-id gpt-4o-2024-08-06 \
--endpoints chat-completions,embeddings \
--features streaming,tool-callingEndpoint tokens include chat-completions, responses, messages, embeddings, rerank,
and media endpoints; feature tokens include streaming, tool-calling, parallel-tool-calls,
json-mode, structured-outputs, reasoning, vision-input, prompt-caching, and more.
Remove a binding:
provon gateway providers unbind-model <key-id> <binding-id>Model Selection Manifest#
provon gateway model-selection
provon gateway model-selection --endpoint chat-completions --features streamingRouting#
provon gateway routing get
provon gateway routing model-policies '{"rules":[]}'
provon gateway routing model-policies --file ./model-policies.json
provon gateway routing auto-router '{"enabled":true}'
provon gateway routing auto-router --file ./auto-router.jsonEach JSON command accepts inline JSON or --file, not both (gateway.conflicting_input).
Guardrails#
provon gateway guardrails get
provon gateway guardrails set-mode monitor
provon gateway guardrails update '{"mode":"enforce","rules":[]}'
provon gateway guardrails update --file ./guardrails.jsonModes: off, monitor, enforce. set-mode writes the mode with an empty rule set; use
update when you need to preserve existing rules.
Observability#
provon gateway observability get
provon gateway observability update '{"logPayloads":false}'
provon gateway observability update --file ./observability.jsonLifecycle And Settings#
provon gateway pause
provon gateway resume
provon gateway settings get
provon gateway settings update '{"modelPolicies":{}}'
provon gateway settings update --file ./settings.json
provon gateway settings deleteSuccess Check#
provon gateway providers listConfigured keys appear with bindings; after creating a custom provider, providers test returns
a successful connection result before traffic depends on it.
Troubleshooting#
| Symptom | Likely cause | Fix |
|---|---|---|
HTTP_403 on management commands |
Missing gateway:manage |
Use an administrative credential or key with the capability |
gateway.custom_endpoint_required |
Custom provider without a URL | Supply --endpoint-url or --base-url |
gateway.responses_endpoint_required |
Native mode without a responses URL | Add --responses-endpoint-url, or use bridge-chat-completions |
test fails with auth error |
Missing or wrong key/header | Verify --api-key, or use --auth-header / --no-auth per the upstream |
| Binding rejected feature name | Unknown feature token | Use tokens from the feature list above |
gateway.conflicting_input |
Inline JSON and --file together |
Pass only one form |
| Traffic routed to the wrong provider | Priority or model policy conflict | Review routing get, adjust reorder or policies |
All calls blocked after pause |
Gateway intentionally paused | provon gateway resume |