Skip to content

doctor: per-toolset hint for unavailable multi-provider toolsets (#40)#41

Merged
PowerCreek merged 1 commit into
mainfrom
doctor-tool-unavailable-detail
May 23, 2026
Merged

doctor: per-toolset hint for unavailable multi-provider toolsets (#40)#41
PowerCreek merged 1 commit into
mainfrom
doctor-tool-unavailable-detail

Conversation

@PowerCreek

Copy link
Copy Markdown

Summary

Closes #40. Surveying image_gen + video_gen plugins for diagnostic-loudness gaps. Found a real one in the Tool Availability section.

tools/video_generation_tool.py + tools/image_generation_tool.py (and similar) register with requires_env=[] because the toolset is multi-provider (any of FAL, xAI, OpenAI works). When no provider is configured, doctor's unavailable loop falls through to (system dependency not met) — accurate but unhelpful. Operators have to grep the plugin docs to learn which env var would unblock them.

Fix

Add _doctor_tool_unavailable_detail(toolset) -> str, parallel to the existing _doctor_tool_availability_detail. Returns per-toolset hints:

toolset hint
image_gen no image-gen provider configured — set OPENAI_API_KEY, XAI_API_KEY, or use OpenAI Codex OAuth (see hermes tools)
video_gen no video-gen provider configured — set FAL_KEY, XAI_API_KEY, or use xAI OAuth (see hermes tools)

The unavailable loop prefers this string when no explicit requires_env to surface. Falls back to (system dependency not met) for any toolset without an entry — no regression for non-listed toolsets.

Why not generalize at registry-level

A general "alternative env-var sets" declaration in the tool registry would let every multi-provider toolset describe its own fallback. That's a bigger registry-API change and not yet justified — only two such toolsets ship today (image_gen, video_gen). When a third lands, the generalization becomes worth the cost. Until then, two per-toolset rows in doctor are the minimum viable diagnostic.

Test plan

  • 3 new tests in tests/hermes_cli/test_doctor.py::TestDoctorToolUnavailableDetail:
    • image_gen mentions OPENAI_API_KEY, XAI_API_KEY, and OAuth fallback
    • video_gen mentions FAL_KEY, XAI_API_KEY
    • Unknown / empty toolset returns "" so doctor falls back to its generic line
  • pytest tests/hermes_cli/test_doctor.py → 68 passed (65 existing + 3 new).

Filed by hermes-maintainer (PowerCreek).

Surveying image_gen + video_gen plugins for diagnostic-loudness
gaps. Found a real one in the Tool Availability section.

video_generation_tool.py + image_generation_tool register with
requires_env=[] because the toolset is multi-provider (any of
FAL, xAI, OpenAI works). When no provider is configured, doctor's
unavailable loop falls through to `(system dependency not met)`
— accurate but unhelpful: operators have to grep the plugin docs
to learn which env var would unblock them.

Add `_doctor_tool_unavailable_detail(toolset) -> str`, parallel to
the existing `_doctor_tool_availability_detail`. Returns per-toolset
hints:

  image_gen → "no image-gen provider configured — set
               OPENAI_API_KEY, XAI_API_KEY, or use OpenAI Codex
               OAuth (see `hermes tools`)"
  video_gen → "no video-gen provider configured — set FAL_KEY,
               XAI_API_KEY, or use xAI OAuth (see `hermes tools`)"

The unavailable loop prefers this when no explicit `requires_env`
to surface. Falls back to "(system dependency not met)" for any
toolset without an entry.

Tests:
  - image_gen hint mentions OPENAI_API_KEY + XAI_API_KEY + OAuth.
  - video_gen hint mentions FAL_KEY + XAI_API_KEY.
  - Unknown toolsets return ""; the doctor loop falls back to the
    generic line.

68 doctor-tests pass — no regression.

Closes #40.
@PowerCreek PowerCreek merged commit 8cdc266 into main May 23, 2026
@PowerCreek PowerCreek deleted the doctor-tool-unavailable-detail branch May 23, 2026 01:02
PowerCreek added a commit that referenced this pull request May 23, 2026
After shipping the image_gen / video_gen hint in #41 / #40,
the parallel gap exists for the web toolset — same shape:
multi-provider, registered with requires_env=[]. Without any
provider configured + ddgs not installed, doctor previously
said "(system dependency not met)" — accurate but unhelpful.

Add a "web" entry to _doctor_tool_unavailable_detail listing
the alternative env vars:
  TAVILY_API_KEY, BRAVE_SEARCH_API_KEY, EXA_API_KEY,
  FIRECRAWL_API_KEY, SEARXNG_URL — or `pip install ddgs` for
  the keyless DuckDuckGo backend.

Calling out ddgs explicitly matters: it's the simplest unblock
for operators on a lightweight install who don't want to deal
with API keys at all. Everyone else picks their preferred paid /
self-hosted provider from the list.

Test mirrors the image_gen + video_gen pattern — asserts each
env var appears in the hint plus the keyless ddgs callout.
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.

doctor Tool Availability: video_gen + image_gen show unhelpful '(system dependency not met)' when no provider configured

1 participant