Skip to content

fix(cli): skip dedicated-check providers in apikey loop#22512

Closed
AllynSheep wants to merge 1 commit into
NousResearch:mainfrom
AllynSheep:fix/doctor-anthropic-dedup-check
Closed

fix(cli): skip dedicated-check providers in apikey loop#22512
AllynSheep wants to merge 1 commit into
NousResearch:mainfrom
AllynSheep:fix/doctor-anthropic-dedup-check

Conversation

@AllynSheep

Copy link
Copy Markdown
Contributor

Fixes #22346: hermes doctor runs duplicate health checks for providers that already have dedicated check sections (Anthropic, OpenRouter).

Root Cause

The generic _apikey_providers loop at line 1265 uses Authorization: Bearer header, which fails for Anthropic's required x-api-key header. Since Anthropic already has a dedicated check section (lines 1203-1256), the generic loop creates a duplicate check with wrong auth.

Fix

Add _DEDICATED_CHECKS set with provider names that have dedicated health-check sections. Skip these providers in the _apikey_providers loop to avoid duplicate checks with wrong auth headers.

Testing

  • hermes doctor now shows single Anthropic API check (✓) instead of duplicate (✓ + ⚠ HTTP 404)

Fixes NousResearch#22346: `hermes doctor` runs duplicate health checks for
providers that already have dedicated check sections (Anthropic,
OpenRouter). The generic loop uses `Authorization: Bearer` header,
which fails for Anthropic's required `x-api-key` header.

- Add `_DEDICATED_CHECKS` set with providers that have dedicated
  health-check sections
- Skip these providers in the `_apikey_providers` loop to avoid
  duplicate checks with wrong auth headers

This ensures Anthropic check uses the correct `x-api-key` header
via its dedicated check section.
@teknium1

teknium1 commented May 9, 2026

Copy link
Copy Markdown
Contributor

Closing in favor of #22801 (salvage of #22529). Both PRs converged on the same approach (skip dedicated-check providers in the apikey loop). #22529 had a wider skip set (includes Bedrock), alias-aware via normalize_provider, and shipped regression tests. Credited in the salvage PR body. Thanks!

@teknium1 teknium1 closed this May 9, 2026
@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists labels May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hermes doctor: duplicate anthropic check fails with HTTP 404 (wrong auth header in pluggable provider check)

3 participants