Skip to content

fix: show correct env var name in provider API key error#10563

Merged
teknium1 merged 1 commit into
mainfrom
fix/alibaba-env-var-name
Apr 15, 2026
Merged

fix: show correct env var name in provider API key error#10563
teknium1 merged 1 commit into
mainfrom
fix/alibaba-env-var-name

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Fixes #9506 — The error message for missing provider API keys dynamically constructed the env var name as {PROVIDER}_API_KEY. For alibaba this produced ALIBABA_API_KEY, but Hermes actually reads DASHSCOPE_API_KEY. Users following the error message set the wrong variable and got nowhere.

Fix

Look up the actual env var from PROVIDER_REGISTRY before building the error. Falls back to the dynamic name if the registry import fails.

Before: Set the ALIBABA_API_KEY environment variable
After:  Set the DASHSCOPE_API_KEY environment variable

12 lines added to run_agent.py.

The error message for missing provider API keys dynamically built
the env var name as PROVIDER_API_KEY (e.g. ALIBABA_API_KEY), but
some providers use different names (alibaba uses DASHSCOPE_API_KEY).
Users following the error message set the wrong variable.

Fix: look up the actual env var from PROVIDER_REGISTRY before
building the error. Falls back to the dynamic name if the registry
lookup fails.

Closes #9506
@teknium1 teknium1 merged commit 2918328 into main Apr 15, 2026
6 of 7 checks passed
@teknium1 teknium1 deleted the fix/alibaba-env-var-name branch April 15, 2026 23:31
kagura-agent pushed a commit to kagura-agent/hermes-agent that referenced this pull request Apr 16, 2026
…h#9506) (NousResearch#10563)

The error message for missing provider API keys dynamically built
the env var name as PROVIDER_API_KEY (e.g. ALIBABA_API_KEY), but
some providers use different names (alibaba uses DASHSCOPE_API_KEY).
Users following the error message set the wrong variable.

Fix: look up the actual env var from PROVIDER_REGISTRY before
building the error. Falls back to the dynamic name if the registry
lookup fails.

Closes NousResearch#9506
ulasbilgen pushed a commit to ulasbilgen/hermes-adhd-agent that referenced this pull request May 1, 2026
…h#9506) (NousResearch#10563)

The error message for missing provider API keys dynamically built
the env var name as PROVIDER_API_KEY (e.g. ALIBABA_API_KEY), but
some providers use different names (alibaba uses DASHSCOPE_API_KEY).
Users following the error message set the wrong variable.

Fix: look up the actual env var from PROVIDER_REGISTRY before
building the error. Falls back to the dynamic name if the registry
lookup fails.

Closes NousResearch#9506
aj-nt pushed a commit to aj-nt/hermes-agent that referenced this pull request May 1, 2026
…h#9506) (NousResearch#10563)

The error message for missing provider API keys dynamically built
the env var name as PROVIDER_API_KEY (e.g. ALIBABA_API_KEY), but
some providers use different names (alibaba uses DASHSCOPE_API_KEY).
Users following the error message set the wrong variable.

Fix: look up the actual env var from PROVIDER_REGISTRY before
building the error. Falls back to the dynamic name if the registry
lookup fails.

Closes NousResearch#9506
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
…h#9506) (NousResearch#10563)

The error message for missing provider API keys dynamically built
the env var name as PROVIDER_API_KEY (e.g. ALIBABA_API_KEY), but
some providers use different names (alibaba uses DASHSCOPE_API_KEY).
Users following the error message set the wrong variable.

Fix: look up the actual env var from PROVIDER_REGISTRY before
building the error. Falls back to the dynamic name if the registry
lookup fails.

Closes NousResearch#9506
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
…h#9506) (NousResearch#10563)

The error message for missing provider API keys dynamically built
the env var name as PROVIDER_API_KEY (e.g. ALIBABA_API_KEY), but
some providers use different names (alibaba uses DASHSCOPE_API_KEY).
Users following the error message set the wrong variable.

Fix: look up the actual env var from PROVIDER_REGISTRY before
building the error. Falls back to the dynamic name if the registry
lookup fails.

Closes NousResearch#9506
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
…h#9506) (NousResearch#10563)

The error message for missing provider API keys dynamically built
the env var name as PROVIDER_API_KEY (e.g. ALIBABA_API_KEY), but
some providers use different names (alibaba uses DASHSCOPE_API_KEY).
Users following the error message set the wrong variable.

Fix: look up the actual env var from PROVIDER_REGISTRY before
building the error. Falls back to the dynamic name if the registry
lookup fails.

Closes NousResearch#9506
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.

[Bug]: alibaba provider error message shows wrong env var name (ALIBABA_API_KEY instead of DASHSCOPE_API_KEY)

1 participant