Anthropic

Detailed information on the Anthropic conversation component

Component format

A Dapr conversation.yaml component file has the following structure:

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: anthropic
spec:
  type: conversation.anthropic
  metadata:
  - name: key
    value: "mykey"
  - name: model
    value: claude-sonnet-4-6
  - name: responseCacheTTL
    value: 10m

Spec metadata fields

FieldRequiredDetailsExample
keyYAPI key for Anthropic."mykey"
modelNThe Anthropic LLM to use. Defaults to claude-sonnet-4-6. If the ANTHROPIC_MODEL environment variable is set on the Dapr sidecar, its value overrides this field.claude-sonnet-4-6
maxTokensNDefault maximum number of tokens the model may generate per request. A request-level maxTokens value overrides this default. When unset, no cap is sent and the provider’s own default applies.2048
responseCacheTTLNTime-to-live for the in-memory response cache. When set, identical requests are served from cache until they expire.10m
Last modified October 22, 2026: Upmerge v1.18 into v1.19 (9805cc1cf)