fix: hermes doctor correctly diagnoses image_gen as missing API key - #9558
Closed
kagura-chen wants to merge 1 commit into
Closed
kagura-chen wants to merge 1 commit into
kagura-chen wants to merge 1 commit into
Conversation
…pendency Add diagnostic_hint field to ToolEntry so tools with requires_env=[] can provide a meaningful message when their check_fn fails. image_generate now shows 'missing FAL_KEY or Nous auth' instead of the generic 'system dependency not met'. Closes NousResearch#9516 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
kagura-chen
force-pushed
the
fix/doctor-image-gen-diagnostic
branch
from
April 15, 2026 02:12
7842b1a to
720c3dc
Compare
Author
|
CI note: The |
Author
|
Closing to reduce PR backlog. The fix is still valid — happy to reopen or resubmit if there's interest. Thanks! |
1 task done
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.
Fixes #9516
Problem
After managed Nous image generation support was added (commit 95dc9aa),
image_generatewas registered withrequires_env=[]sinceFAL_KEYis no longer the only authentication path. However,hermes doctorusesrequires_envto decide what message to show:env_varsis non-empty → shows "missing X, Y, Z"env_varsis empty → shows "system dependency not met"This means
image_genalways shows the misleading "system dependency not met" message, even though the actual problem is missing credentials (FAL_KEY or Nous auth).Fix
Added a
diagnostic_hintfield toToolEntryin the tool registry. Tools that have complex availability requirements (not just env vars) can now provide a human-readable hint thathermes doctorwill display instead of the generic "system dependency not met" fallback.Changes
tools/registry.py: Addeddiagnostic_hintslot toToolEntry, accepted inregister(), propagated throughcheck_tool_availability()tools/image_generation_tool.py: Setdiagnostic_hint="missing FAL_KEY or Nous auth"on theimage_generateregistrationhermes_cli/doctor.py: Check fordiagnostic_hintbefore falling back to "system dependency not met"Before
After
Tools without a
diagnostic_hintcontinue to show "system dependency not met" as before.