fix(runtime): support direct openai provider#5932
Closed
bobashopcashier wants to merge 2 commits into
Closed
Conversation
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! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
openaias a first-class direct provider backed byOPENAI_API_KEYandhttps://api.openai.com/v1model.provider: openaito OpenRouterWhy
The original PR fixed the crash by routing
openaito OpenRouter, but that was the wrong backend for this config. Hermes should treatmodel.provider: openaias 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 -quv 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 -qstill reports two unrelatedTestHasAnyProviderConfiguredfailures in this environment.