rpk ai llm-provider apply
Reconcile LLM providers from one or more YAML manifests.
For each manifest: create the resource if absent, otherwise update every field that differs from the live resource. A manifest is the COMPLETE desired state, so a field you omit is not left alone - it is compared against the value a create from that manifest would have produced, and reconciled to it. Lists, maps and oneof variants replace wholesale. Fields that can only be set at creation time are immutable; changing one is an error.
Manifests round-trip with get -o yaml for this resource, which is how to
start from a complete one. Pass -f - to read stdin.
This does not delete resources absent from the manifests (no prune); see
diff --help.
A provider group file is an LLM provider with group_config and a members
list. Each member has a name (its member id), an explicit priority (lower is
tried first, unique in the group), one provider config such as
anthropic_config, and optionally model_overrides, first_token_timeout,
response_timeout and retries. A member’s secrets are references, as on a
provider (api_key_ref). Without a members key, apply leaves the group’s
members alone. An empty list (members: []) deletes them all, and a members
key with no list is an error. The gateway decides whether groups are
available.
Members are the exception to no prune. Apply creates members missing on
the server, updates changed ones and deletes members the list leaves out.
It writes the group first, so a gateway that refuses the group gets no
member. Members are added before any is removed, unless the new member
needs the removed one’s priority. A change of priorities, such as a swap,
applies without two members holding one priority at any point. A member the
server refuses stops apply there and keeps the changes made before it. Fix
the file and apply again.
| This command was introduced in ai version 0.2.28. |
Examples
This section provides examples of how to use rpk ai llm-provider apply.
claude-group.yaml
name: claude-group
enabled: true
group_config:
wire_format: GROUP_WIRE_FORMAT_ANTHROPIC_MESSAGES
models:
- claude-sonnet-4-5
provider_models:
- name: claude-sonnet-4-5
transcripts:
record_input_messages: true
record_output_messages: true
members:
- name: anthropic
priority: 10
anthropic_config:
api_key_ref: ANTHROPIC_API_KEY
- name: bedrock
priority: 20
retries: 1
model_overrides:
claude-sonnet-4-5: us.anthropic.claude-sonnet-4-5-20250929-v1:0
bedrock_config:
region: us-east-1
rpk ai llm-provider diff -f claude-group.yaml
rpk ai llm-provider apply -f claude-group.yaml
Flags
| Value | Type | Description |
|---|---|---|
|
strings |
manifest file, directory, or - for stdin ( |
Global flags
| Value | Type | Description |
|---|---|---|
|
string |
Redpanda or |
|
stringArray |
Override |
|
bool |
Ignore |
|
string |
|
|
bool |
Enable verbose logging. |