Skip to content

Provider CRD

The Provider custom resource defines a reusable LLM provider configuration that can be referenced by multiple AgentRuntimes. This enables centralized credential management and consistent model configuration across agents.

apiVersion: omnia.altairalabs.ai/v1alpha1
kind: Provider

The provider wire protocol (message/response format).

ValueDescriptionRequires Credentials
claudeAnthropic Claude wire protocolYes (unless hosted via platform)
openaiOpenAI chat completions wire protocolYes (unless hosted via platform)
geminiGoogle Gemini wire protocolYes (unless hosted via platform)
vllmvLLM-served OpenAI-compatible endpointNo (auth via custom headers)
voyageaiVoyage AI embedding modelsYes (VOYAGE_API_KEY)
ollamaLocal Ollama models (for development)No
mockMock provider (for testing)No
spec:
type: claude

Hyperscaler hosting (AWS Bedrock, Azure AI Foundry, GCP Vertex AI) is expressed by setting spec.platform (and spec.auth) on a claude, openai, or gemini provider — not as a separate provider type. See platform below.

The model identifier to use. If not specified, the provider’s default model is used.

ProviderExample Models
Claude (direct)claude-sonnet-4-20250514, claude-opus-4-20250514
Claude on Bedrockclaude-sonnet-4-20250514 — auto-mapped to the Bedrock model ID
OpenAI (direct)gpt-4o, gpt-4-turbo, gpt-3.5-turbo
OpenAI on AzureYour Azure deployment name (e.g., gpt-4o)
Gemini (direct)gemini-pro, gemini-1.5-pro
Gemini on Vertexgemini-1.5-pro, gemini-1.5-flash
vLLM / OllamaModel name served by the endpoint (e.g., llama3:8b)
spec:
type: claude
model: claude-sonnet-4-20250514

Reference to a Secret containing API credentials.

FieldTypeRequiredDescription
secretRef.namestringYesName of the Secret
secretRef.keystringNoSpecific key to use (auto-detected if omitted)
spec:
secretRef:
name: llm-credentials

If key is not specified, the controller looks for provider-appropriate keys:

  • Claude: ANTHROPIC_API_KEY or api-key
  • OpenAI: OPENAI_API_KEY or api-key
  • Gemini: GEMINI_API_KEY or api-key

Flexible credential configuration supporting multiple credential strategies. Mutually exclusive with secretRef. Exactly one sub-field must be specified.

FieldTypeDescription
credential.secretRef.namestringName of a Kubernetes Secret
credential.secretRef.keystringSpecific key within the Secret (auto-detected if omitted)
credential.envVarstringEnvironment variable name containing the credential
credential.filePathstringPath to a file containing the credential

Equivalent to the legacy secretRef field, but nested under credential:

spec:
credential:
secretRef:
name: anthropic-credentials
key: ANTHROPIC_API_KEY # optional

For CI/CD pipelines or environments where credentials are pre-injected as environment variables:

spec:
credential:
envVar: ANTHROPIC_API_KEY

The variable must be available in the runtime pod. The controller cannot validate its presence — a CredentialConfigured condition is set with reason EnvVar.

For credentials mounted as files (e.g., via a volume mount or CSI driver):

spec:
credential:
filePath: /var/secrets/api-key

The file must be mounted in the runtime pod. The controller cannot validate its presence — a CredentialConfigured condition is set with reason FilePath.

Migration from secretRef: The legacy secretRef field continues to work, but new providers should use credential.secretRef instead. Setting both secretRef and credential on the same Provider is rejected by CEL validation.

Hyperscaler-specific configuration. Required for provider types bedrock, vertex, and azure-ai.

FieldTypeRequiredDescription
platform.typestringYesHyperscaler hosting platform: bedrock, vertex, or azure
platform.regionstringNoCloud region (e.g., us-east-1, us-central1). Required for bedrock and vertex.
platform.projectstringNoGCP project ID — required when platform.type is vertex.
platform.endpointstringNoOverride the default platform API endpoint — required when platform.type is azure.

Provider × platform combinations:

Any of claude, openai, or gemini may be configured on any of bedrock, vertex, or azure. The wire protocol (spec.type) and the hosting platform (spec.platform.type) are independent — the CRD admits all nine combinations.

Setting spec.platform on any other provider type (e.g., vllm, ollama, mock) is rejected at admission. Setting spec.platform without spec.auth (or vice versa) is also rejected.

The authentication method is determined by the platform (see auth below):

platformallowed auth methods
bedrockworkloadIdentity, accessKey
vertexworkloadIdentity, serviceAccount
azureworkloadIdentity, servicePrincipal

Today the PromptKit runtime routes requests correctly only for these three canonical combinations:

  • claude on bedrock
  • openai on azure
  • gemini on vertex

The Provider CR accepts all nine combinations, but the other six will resolve credentials successfully and then route requests to the wrong endpoint until PromptKit#1009 lands. The dashboard surfaces an inline warning when you pick one of those combinations.

spec:
type: claude
model: claude-sonnet-4-20250514 # auto-mapped to the Bedrock model ID
platform:
type: bedrock
region: us-east-1
spec:
type: gemini
model: gemini-1.5-pro
platform:
type: vertex
region: us-central1
project: my-gcp-project
spec:
type: openai
model: gpt-4o
platform:
type: azure
endpoint: https://my-resource.openai.azure.com

Authentication configuration for platform-hosted providers. Required when spec.platform is set; forbidden otherwise.

FieldTypeRequiredDescription
auth.typestringYesAuthentication method (see matrix below)
auth.roleArnstringNoAWS IAM role ARN for IRSA (only when platform.type is bedrock)
auth.serviceAccountEmailstringNoGCP service account email (only when platform.type is vertex)
auth.credentialsSecretRefSecretKeyRefNoSecret containing platform credentials (required for static auth)
platform.typeallowed auth.type
bedrockworkloadIdentity, accessKey
vertexworkloadIdentity, serviceAccount
azureworkloadIdentity, servicePrincipal

Expected secret keys per static auth type:

auth.typeRequired keys in credentialsSecretRef
accessKeyAWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY (optional AWS_SESSION_TOKEN)
serviceAccountcredentials.json (or a custom key set via credentialsSecretRef.key)
servicePrincipalAZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET

CEL rules:

  • credentialsSecretRef is required for accessKey, serviceAccount, and servicePrincipal.
  • credentialsSecretRef is disallowed for workloadIdentity (workload identity relies on pod-level identity).
spec:
type: claude
platform:
type: bedrock
region: us-east-1
auth:
type: workloadIdentity
roleArn: arn:aws:iam::123456789012:role/omnia-bedrock-role
spec:
type: claude
platform:
type: bedrock
region: us-east-1
auth:
type: accessKey
credentialsSecretRef:
name: aws-credentials

Override the provider’s default API endpoint. Useful for proxies, gateways (OpenRouter), or self-hosted models.

spec:
type: openai
baseURL: https://my-openai-proxy.internal/v1

Custom HTTP headers included on every provider request. Typical use: gateway providers that require attribution headers (OpenRouter’s HTTP-Referer and X-Title), or shared vLLM deployments that use tenant routing headers.

spec:
type: openai
baseURL: https://openrouter.ai/api/v1
headers:
HTTP-Referer: https://example.com
X-Title: omnia
credential:
secretRef:
name: openrouter-credentials

Collisions with built-in provider headers are rejected by PromptKit at request time.

Lists what modalities and features this provider supports. Used for capability-based filtering when binding Arena providers. The field is optional — existing providers continue to work without it.

ValueDescription
textText generation
streamingStreaming responses
visionImage/visual input
toolsTool/function calling
jsonStructured JSON output
audioAudio input/output
videoVideo input
documentsDocument (PDF) input
duplexFull-duplex (bidirectional streaming)
spec:
capabilities:
- text
- streaming
- vision
- tools
- json

Tuning parameters applied to all requests using this provider.

FieldTypeRangeDescription
temperaturestring0.0-2.0Controls randomness (lower = more focused)
topPstring0.0-1.0Nucleus sampling threshold
maxTokensinteger-Maximum tokens in response
contextWindowinteger-Model’s maximum context size in tokens. When conversation history exceeds this budget, truncation is applied. If not specified, no automatic truncation is performed.
truncationStrategystring-How to handle context overflow: sliding (default — remove oldest messages first), summarize (summarize old messages before removing), custom (delegate to custom runtime implementation)
spec:
defaults:
temperature: "0.7"
topP: "0.9"
maxTokens: 4096
contextWindow: 200000
truncationStrategy: sliding

Custom pricing for cost tracking. If not specified, PromptKit’s built-in pricing is used.

FieldTypeDescription
inputCostPer1KstringCost per 1000 input tokens
outputCostPer1KstringCost per 1000 output tokens
cachedCostPer1KstringCost per 1000 cached tokens
spec:
pricing:
inputCostPer1K: "0.003"
outputCostPer1K: "0.015"
cachedCostPer1K: "0.0003"
ValueDescription
ReadyProvider is configured and credentials are valid
ErrorConfiguration error or invalid credentials
TypeDescription
ReadyOverall readiness of the Provider
SecretFoundReferenced Secret exists and contains required key
CredentialConfiguredCredential source is configured (secretRef, envVar, or filePath)
AuthConfiguredAuth configuration is valid (hyperscaler providers only)
apiVersion: v1
kind: Secret
metadata:
name: anthropic-credentials
namespace: agents
stringData:
ANTHROPIC_API_KEY: "sk-ant-api03-..."
---
apiVersion: omnia.altairalabs.ai/v1alpha1
kind: Provider
metadata:
name: claude-production
namespace: agents
spec:
type: claude
model: claude-sonnet-4-20250514
credential:
secretRef:
name: anthropic-credentials
capabilities:
- text
- streaming
- vision
- tools
- json
defaults:
temperature: "0.7"
maxTokens: 4096
contextWindow: 200000
truncationStrategy: sliding
pricing:
inputCostPer1K: "0.003"
outputCostPer1K: "0.015"

Claude on AWS Bedrock with workload identity

Section titled “Claude on AWS Bedrock with workload identity”
apiVersion: omnia.altairalabs.ai/v1alpha1
kind: Provider
metadata:
name: bedrock-production
namespace: agents
spec:
type: claude
model: claude-sonnet-4-20250514 # auto-mapped to the corresponding Bedrock model ID
platform:
type: bedrock
region: us-east-1
auth:
type: workloadIdentity
roleArn: arn:aws:iam::123456789012:role/omnia-bedrock-role
capabilities:
- text
- streaming
- vision
- tools
defaults:
temperature: "0.7"
maxTokens: 4096

Reference a Provider from an AgentRuntime using providerRef:

apiVersion: omnia.altairalabs.ai/v1alpha1
kind: AgentRuntime
metadata:
name: my-agent
spec:
promptPackRef:
name: my-prompts
providerRef:
name: claude-production
namespace: agents # Optional, defaults to same namespace
facade:
type: websocket
port: 8080

You can create multiple Provider resources for different use cases:

# Production provider with Claude Sonnet
apiVersion: omnia.altairalabs.ai/v1alpha1
kind: Provider
metadata:
name: claude-production
spec:
type: claude
model: claude-sonnet-4-20250514
credential:
secretRef:
name: prod-credentials
defaults:
temperature: "0.3" # More deterministic
---
apiVersion: omnia.altairalabs.ai/v1alpha1
kind: Provider
metadata:
name: claude-development
spec:
type: claude
model: claude-haiku-20250514
credential:
secretRef:
name: dev-credentials
defaults:
temperature: "0.7"

Providers can be referenced across namespaces:

apiVersion: omnia.altairalabs.ai/v1alpha1
kind: AgentRuntime
metadata:
name: my-agent
namespace: app-team
spec:
providerRef:
name: shared-claude-provider
namespace: shared-providers # Provider in different namespace

Note: Ensure appropriate RBAC permissions are configured for cross-namespace access.