hermes-agent/website/docs/guides
Teknium bd10acd747
fix(providers): honor key_env/api_key_env on Azure Anthropic + accept alias in normalizer (#16935)
Three related fixes around custom env-var-name hints for provider entries.

1. Azure Anthropic path: previously hardcoded to look up AZURE_ANTHROPIC_KEY
   then ANTHROPIC_API_KEY with no way to override.  If a user wrote
     model:
       provider: anthropic
       base_url: https://my-resource.services.ai.azure.com/anthropic
       key_env: MY_CUSTOM_KEY
   the key_env hint was silently ignored and the resolver raised
   'No Azure Anthropic API key found' even when MY_CUSTOM_KEY was set
   in the environment.  The runtime now checks, in order:
     (1) os.getenv(model_cfg.key_env)
     (2) os.getenv(model_cfg.api_key_env)    # docs alias
     (3) model_cfg.api_key                     # inline value
     (4) AZURE_ANTHROPIC_KEY                   # historical default
     (5) ANTHROPIC_API_KEY                     # historical default
   Error message updated to mention key_env as an option.

2. Provider entry normalizer (_normalize_custom_provider_entry): accept
   'api_key_env' as a snake_case alias for 'key_env', and 'apiKeyEnv' as a
   camelCase alias.  Adds both to the _KNOWN_KEYS set so the 'unknown
   config keys ignored' warning doesn't fire on valid configs.

3. _VALID_CUSTOM_PROVIDER_FIELDS: add 'key_env'.  That set documents
   supported custom_providers entry fields; it was drifting from reality
   since key_env has been read at runtime in auxiliary_client.py,
   runtime_provider.py, and main.py for a while.

Docs: website/docs/guides/azure-foundry.md now uses the canonical key_env
field and notes that api_key_env / keyEnv / apiKeyEnv are accepted as
aliases.

Validation: 12 new tests in test_runtime_provider_resolution.py covering
all 5 Azure Anthropic resolution paths + 4 normalizer-alias tests.  Pass
rate across related suites (165 + 46 tests): 100%.

Co-authored-by: teknium1 <teknium@users.noreply.github.com>
2026-04-28 02:12:08 -07:00
..
_category_.json docs: add Guides & Tutorials section, restructure sidebar 2026-03-08 19:37:34 -07:00
automate-with-cron.md docs: fix 30+ inaccuracies across documentation (#9023) 2026-04-13 10:53:10 -07:00
automation-templates.md docs: automation templates gallery + comparison post (#9821) 2026-04-14 12:30:50 -07:00
aws-bedrock.md feat: native AWS Bedrock provider via Converse API 2026-04-15 16:17:17 -07:00
azure-foundry.md fix(providers): honor key_env/api_key_env on Azure Anthropic + accept alias in normalizer (#16935) 2026-04-28 02:12:08 -07:00
build-a-hermes-plugin.md feat(nix): declarative plugin installation for NixOS module (#15953) 2026-04-28 00:18:32 +05:30
cron-troubleshooting.md docs: add QQBot to all 14 docs pages (full platform parity) 2026-04-14 00:11:49 -07:00
daily-briefing-bot.md docs(cron): clarify default model/provider setup for scheduled jobs 2026-04-23 02:04:45 -07:00
delegation-patterns.md docs(delegate): document max_concurrent_children and max_spawn_depth + cost warning 2026-04-24 20:38:58 -07:00
github-pr-review-agent.md fix(docs): unbreak docs-site-checks — ascii-guard diagram + MDX <1% (#12984) 2026-04-20 04:29:02 -07:00
local-llm-on-mac.md docs: document streaming timeout auto-detection for local LLMs (#6990) 2026-04-09 23:28:25 -07:00
migrate-from-openclaw.md feat(claw-migrate): harden OpenClaw import with plan-first apply, redaction, and pre-migration backup (#16911) 2026-04-28 01:50:23 -07:00
python-library.md docs: guides section overhaul — fix existing + add 3 new tutorials (#5735) 2026-04-06 22:02:47 -07:00
team-telegram-assistant.md docs: guides section overhaul — fix existing + add 3 new tutorials (#5735) 2026-04-06 22:02:47 -07:00
tips.md docs: fix 40+ discrepancies between documentation and codebase (#5818) 2026-04-07 10:17:44 -07:00
use-mcp-with-hermes.md docs: guides section overhaul — fix existing + add 3 new tutorials (#5735) 2026-04-06 22:02:47 -07:00
use-soul-with-hermes.md docs: guides section overhaul — fix existing + add 3 new tutorials (#5735) 2026-04-06 22:02:47 -07:00
use-voice-mode-with-hermes.md feat(voice): add cli beep toggle 2026-04-21 00:29:29 -07:00
webhook-github-pr-review.md docs: add PR review guides, rework quickstart, slim down installation 2026-04-19 05:30:50 -07:00
work-with-skills.md docs(skills): document URL install across features, reference, guide, and hermes-agent skill (#16355) 2026-04-26 21:27:59 -07:00