Skip to content

Comments

feat: add generic secretEnv option for provider API keys#13

Open
andreabadesso wants to merge 1 commit intoopenclaw:mainfrom
andreabadesso:feat/secret-env
Open

feat: add generic secretEnv option for provider API keys#13
andreabadesso wants to merge 1 commit intoopenclaw:mainfrom
andreabadesso:feat/secret-env

Conversation

@andreabadesso
Copy link

@andreabadesso andreabadesso commented Jan 25, 2026

Add a flexible secretEnv option that maps environment variable names to secret file paths. The gateway wrapper reads each file at runtime and exports the env var.

Example usage:

secretEnv = {
  ZAI_API_KEY = "/run/secrets/zai_key";
  OPENAI_API_KEY = "/run/secrets/openai_key";
};

This replaces the need for provider-specific options like providers.anthropic.apiKeyFile (now deprecated but still supported for backwards compatibility).

Add a flexible secretEnv option that maps environment variable names
to secret file paths. The gateway wrapper reads each file at runtime
and exports the env var.

Example usage:
  secretEnv = {
    ZAI_API_KEY = "/run/secrets/zai_key";
    OPENAI_API_KEY = "/run/secrets/openai_key";
  };

This replaces the need for provider-specific options like
providers.anthropic.apiKeyFile (now deprecated but still supported
for backwards compatibility).

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant