Skip to content

fix: hermes doctor correctly diagnoses image_gen as missing API key - #9558

Closed
kagura-chen wants to merge 1 commit into
NousResearch:mainfrom
kagura-chen:fix/doctor-image-gen-diagnostic
Closed

kagura-chen wants to merge 1 commit into
NousResearch:mainfrom
kagura-chen:fix/doctor-image-gen-diagnostic

Conversation

@kagura-chen

Copy link
Copy Markdown

Fixes #9516

Problem

After managed Nous image generation support was added (commit 95dc9aa), image_generate was registered with requires_env=[] since FAL_KEY is no longer the only authentication path. However, hermes doctor uses requires_env to decide what message to show:

  • If env_vars is non-empty → shows "missing X, Y, Z"
  • If env_vars is empty → shows "system dependency not met"

This means image_gen always 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_hint field to ToolEntry in the tool registry. Tools that have complex availability requirements (not just env vars) can now provide a human-readable hint that hermes doctor will display instead of the generic "system dependency not met" fallback.

Changes

  • tools/registry.py: Added diagnostic_hint slot to ToolEntry, accepted in register(), propagated through check_tool_availability()
  • tools/image_generation_tool.py: Set diagnostic_hint="missing FAL_KEY or Nous auth" on the image_generate registration
  • hermes_cli/doctor.py: Check for diagnostic_hint before falling back to "system dependency not met"
  • Tests: 6 new tests covering hint storage, propagation, and display

Before

⚠️ image_gen (system dependency not met)

After

⚠️ image_gen (missing FAL_KEY or Nous auth)

Tools without a diagnostic_hint continue to show "system dependency not met" as before.

…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
kagura-chen force-pushed the fix/doctor-image-gen-diagnostic branch from 7842b1a to 720c3dc Compare April 15, 2026 02:12
@kagura-chen

Copy link
Copy Markdown
Author

CI note: The test job failure is an upstream issue — main branch tests are also failing (see latest main runs). This PR's changes are unrelated to the test failures.

@kagura-chen

Copy link
Copy Markdown
Author

Closing to reduce PR backlog. The fix is still valid — happy to reopen or resubmit if there's interest. Thanks!

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]: hermes doctor reports image_gen as “system dependency not met” instead of missing FAL_KEY / Nous auth

1 participant