Skip to content

Add API key environment variable support for conversation components #4054

@bibryam

Description

@bibryam

Description:
Following the successful implementation of centralized model environment variables (PR #3792), we should implement the same pattern for API keys to provide consistent runtime configuration across all conversation components.

Proposed Enhancement:
Add API key environment variables with the same priority order as model selection:
Component metadata (highest priority)
Environment variable (fallback)

Environment Variables to Add:

OPENAI_API_KEY          # OpenAI components
ANTHROPIC_API_KEY       # Anthropic components  
GOOGLEAI_API_KEY        # Google AI components
MISTRAL_API_KEY         # Mistral components
HUGGINGFACE_API_KEY     # HuggingFace components
BEDROCK_API_KEY         # AWS Bedrock (if needed)

Benefits:

  • These are standard, well-known environment variable names already used in the industry.
  • Matches existing model selection behavior and develop familiarity when working with model clients
  • Runtime flexibility without modifying component metadata

Dapr CLI Integration:
The Dapr CLI should recognize and pass these environment variables to the sidecar when running applications

Related:
Follows the same pattern as the model environment variables implemented in #3792
Addresses the API key configuration gap mentioned in the docs PR discussion

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions