fix(cli): suppress OAuth provider warnings in doctor when provider not in use - #37438
Draft
tommck wants to merge 1 commit into
Draft
fix(cli): suppress OAuth provider warnings in doctor when provider not in use#37438tommck wants to merge 1 commit into
tommck wants to merge 1 commit into
Conversation
…t in use When model.provider is set to a provider that doesn't use a given OAuth flow (e.g. custom pointing at a local endpoint, or any API-key provider), hermes doctor showed ⚠ warnings for every OAuth provider it knows about. These warnings looked like actionable issues but were irrelevant noise. Root cause: the Auth Providers section had no knowledge of which provider the user had configured, so it unconditionally warned for every OAuth provider that wasn't logged in. Fix: read model.provider from config.yaml before the Auth Providers section and pass it through to a new _oauth_check() helper. Providers whose relevant_ids set does not include the configured provider are demoted from ⚠ warnings to → info lines. All providers still appear in the output for discoverability; only the severity changes. Behaviour summary: - provider: custom / any API-key provider → all OAuth rows demoted to info - provider: nous → Nous Portal warns; others demoted to info - no model.provider set → all OAuth rows remain as warnings (safe default)
tommck
marked this pull request as draft
June 2, 2026 14:40
Contributor
|
Thanks for identifying a real diagnostic-noise issue: current Problems
Suggested changes
Automated hermes-sweeper review. |
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.
What changed and why
hermes doctorwas unconditionally showing⚠ not logged inwarnings for every OAuth provider it knows about (Nous Portal, OpenAI Codex, Google Gemini, MiniMax, xAI), regardless of which provider the user actually had configured.For users running a local/custom OpenAI-compatible endpoint (
model.provider: custom) or any API-key provider, these warnings are pure noise — there is nothing to act on.Root cause: The Auth Providers section had no knowledge of
model.provider, so it always warned for every OAuth provider that wasn't logged in.Fix: Read
model.providerfromconfig.yamlbefore the Auth Providers section runs, and pass it to a new_oauth_check()helper. Providers whoserelevant_idsset does not include the configured provider are demoted from⚠warnings to→info lines. All providers still appear in the output (for discoverability); only the severity changes.Behaviour summary:
custom/ any API-key provider→info linesnous⚠warn; others →→infoxai⚠warn; others →→infomodel.providerset⚠warn (safe default)How to test
Unit tests:
Platforms tested
Linux (Ubuntu 24.04). The change touches only output formatting logic with no platform-specific syscalls.
Notes
TestDoctorXaiOAuthStatus,TestDoctorCodexCliHintPlacement) all pass unchanged — they use configs with nomodel.provider, which correctly falls through to the "show all as warnings" path._oauth_check()helper is a local function insiderun_doctor(); no new public API is added.