Skip to content

fix(runtime): support direct openai provider#5932

Closed
bobashopcashier wants to merge 2 commits into
NousResearch:mainfrom
bobashopcashier:codex/fix-openai-provider-alias
Closed

fix(runtime): support direct openai provider#5932
bobashopcashier wants to merge 2 commits into
NousResearch:mainfrom
bobashopcashier:codex/fix-openai-provider-alias

Conversation

@bobashopcashier

@bobashopcashier bobashopcashier commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add openai as a first-class direct provider backed by OPENAI_API_KEY and https://api.openai.com/v1
  • stop remapping model.provider: openai to OpenRouter
  • keep runtime/model validation tests aligned with the direct OpenAI path

Why

The original PR fixed the crash by routing openai to OpenRouter, but that was the wrong backend for this config. Hermes should treat model.provider: openai as direct OpenAI API usage, so Discord sessions use the OpenAI API instead of failing provider resolution or silently switching to OpenRouter.

Testing

  • uv run --extra dev python -m pytest tests/hermes_cli/test_model_validation.py tests/test_runtime_provider_resolution.py -q
  • uv run --extra dev python -m pytest tests/test_api_key_providers.py -q -k "openai or explicit_openai or provider_is_api_key"

Notes

  • uv run --extra dev python -m pytest tests/test_api_key_providers.py -q still reports two unrelated TestHasAnyProviderConfigured failures in this environment.

@bobashopcashier bobashopcashier marked this pull request as ready for review April 7, 2026 20:26
@bobashopcashier bobashopcashier changed the title fix(runtime): normalize openai provider alias fix(runtime): support direct openai provider Apr 7, 2026
@teknium1

teknium1 commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

Making 'openai' a first-class provider is a design decision rather than a bugfix — currently the alias to OpenRouter is intentional. Deferring this for a broader discussion. Thanks @aquaright1!

@teknium1 teknium1 closed this Apr 8, 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.

2 participants