Conversation
0cba04c to
5d0775d
Compare
|
Review summary: FIXED 0 / DEFERRED 0 / NOISE 0 / ACTIONABLE 0. CI blocker: required check |
|
Automated review check: BLOCKED. The test job failed, so this PR is not merge-ready yet. build-and-push, check-attribution, and e2e passed; please fix the failing test job and rerun CI. |
a6f1c6f to
c0c8fa2
Compare
c0c8fa2 to
687a485
Compare
…iders Accept api_key_env as a fallback when reading the key_env field in _get_named_custom_provider and _resolve_named_custom_runtime, matching the documented config format and the auxiliary block convention.
687a485 to
c2971d2
Compare
|
what about now? |
…env-conflict # Conflicts: # hermes_cli/runtime_provider.py
|
Thanks for tracking the Problems
Suggested changes
Automated hermes-sweeper review. |
What does this PR do?
Resolves a legacy field naming conflict for custom providers. The documentation and config examples frequently mention using
api_key_envto reference environment variables for authentication with custom OpenAI-compatible endpoints (and theauxiliaryblock natively uses it). However,hermes_cli/config.pyandhermes_cli/runtime_provider.pystrictly looked forkey_env, resulting in silent fallback to a blank token. This caused unexplained 401 HTTP errors when resolving custom endpoints (like SiliconFlow, DMXAPI, or Bedrock gateways).This change adds
api_key_envas a fallback when retrieving the provider's token, making custom provider authentication robust and matching user expectations.Related Issue
Fixes silent token omissions resulting in 401 Unauthorized API responses on custom endpoints.
Type of Change
Changes Made
_normalize_custom_provider_entryinhermes_cli/config.pyto also readapi_key_env._get_named_custom_providerand_resolve_named_custom_runtimeinhermes_cli/runtime_provider.pyto acceptapi_key_envwhen resolving environment keys.How to Test
config.yamlusingapi_key_env: SOME_API_KEY(instead ofkey_env)..envSOME_API_KEYto a valid API token for a custom gateway.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/A