fix: support env-backed keys for custom providers - #5551
Conversation
|
Thanks for tracing this to custom-pool seeding. The gap is still present on current main: Problems
Suggested changes
Automated hermes-sweeper review. |
GottZ
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
Summary
Two PRs are associated with this complex, but only #5551 addresses the reported custom-provider credential-seeding failure: it adds environment-backed key lookup, whereas #5580 implements delegated-child credential leasing and does not touch that root cause.
Related pull requests
- #5551
related— (+78/-2) — keep open, but revise before merge: the diff extends_seed_custom_pool()to readapi_key_envandapi_key_env_vars, directly targeting the missing env-backed custom-provider credentials while preserving inlineapi_key. The contributor keep_open review identifies material gaps in the current patch: it misses canonicalkey_env, bypasses the existing dotenv-aware lookup withos.getenv(), and places regression coverage in the obsolete test path. - #5580 [closed]
related— (+309/-6) — unrelated merged reference: the diff adds soft credential leases and child-agent pool binding for concurrent delegation, not environment-backed custom-provider pool seeding. It remains relevant only as credential-pool history and was subsequently merged via #5748 with the unrelated tool-name restoration change removed.
Suggested consolidation
Merge #5551 after addressing the contributor review by supporting canonical key_env with api_key_env as a compatibility alias, using the existing scoped dotenv-aware lookup, and moving regression coverage to tests/agent/test_credential_pool.py. #5580 is not a duplicate and requires no action here because its distinct delegation-leasing work was already merged via #5748.
Cross-PR triage: Reviewed 2 pull requests and 0 issues in this complex. Each diff was read against this issue; Assessment working set: 21 kB of PR diffs, 4 kB of issue/PR text, 2 kB of discussion (4 comments), 0 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch.
Summary
api_key_envandapi_key_env_varsapi_keybehavior unchangedWhy
Custom OpenAI-compatible providers in
custom_providerscurrently seed credentials from inlineapi_key, but not from env-backed key fields. That causes false "invalid API key" failures even when the configured environment variable is present and direct API calls work.Test Plan
python -m pytest tests/test_credential_pool.py -q -o addopts=''api_key_envandapi_key_env_vars