Skip to content

Fix providers config alias handling#9387

Closed
yeyitech wants to merge 1 commit into
NousResearch:mainfrom
yeyitech:fix-provider-config-aliases
Closed

Fix providers config alias handling#9387
yeyitech wants to merge 1 commit into
NousResearch:mainfrom
yeyitech:fix-provider-config-aliases

Conversation

@yeyitech

Copy link
Copy Markdown
Contributor

Summary

  • accept common camelCase aliases in providers: entries (apiKey, baseUrl, apiMode, keyEnv)
  • stop treating non-URL api: values as endpoint base URLs when a valid URL field exists
  • ignore provider entries that do not contain any valid absolute URL instead of materializing broken runtime endpoints
  • add config diagnostics for camelCase aliases and invalid non-URL api: values

Testing

  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python3 -m pytest -o addopts='' tests/hermes_cli/test_config.py -q
  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python3 -m pytest -o addopts='' tests/hermes_cli/test_config_validation.py -q
  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python3 -m pytest -o addopts='' tests/hermes_cli/test_user_providers_model_switch.py -q

Issues

@houko houko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good fix — camelCase aliases and URL scheme validation improve config robustness. 👍

@yeyitech

Copy link
Copy Markdown
Contributor Author

Thanks. Quick heads-up: this PR currently shows no GitHub checks on my side (gh pr checks reports “no checks reported”). Since this is a fork PR into NousResearch/hermes-agent, could a maintainer please take a quick look at whether the repo's CI needs manual approval or whether Actions for fork PRs aren't triggering here?

@teknium1

Copy link
Copy Markdown
Contributor

Closed in favor of PR #12993 #12993 which fixes the same issue. Your approach of patching runtime_provider.py alongside config.py was a good idea for DRY — may follow up on that. Thanks @yeyitech!

@teknium1 teknium1 closed this Apr 20, 2026
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]: providers: config entries silently ignore apiKey/baseUrl and accept non-URL strings as base_url via the api field

3 participants