Skip to content

fix(cli): validate user-defined providers consistently#14857

Closed
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/custom-provider-validation-14850
Closed

fix(cli): validate user-defined providers consistently#14857
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/custom-provider-validation-14850

Conversation

@LeonSGP43

Copy link
Copy Markdown
Contributor

Summary

  • resolve the active provider in through the user-aware provider resolver
  • teach
    ┌─────────────────────────────────────────────────────────┐
    │ 🩺 Hermes Doctor │
    └─────────────────────────────────────────────────────────┘

◆ Python Environment
✓ Python 3.12.8
⚠ Not in virtual environment (recommended)

◆ Required Packages
✓ OpenAI SDK
✓ Rich (terminal UI)
✓ python-dotenv
✓ PyYAML
✓ HTTPX
⚠ Croniter (cron expressions) (optional, not installed)
⚠ python-telegram-bot (optional, not installed)
⚠ discord.py (optional, not installed)

◆ Configuration Files
✓ ~/.hermes/.env file exists
✓ API key or custom endpoint configured
✓ ~/.hermes/config.yaml exists
✗ model.provider 'kimi-coding' is not a recognised provider (known: ai-gateway, alibaba, anthropic, arcee, auto, bedrock, copilot, copilot-acp, custom, deepseek, gemini, google-gemini-cli, huggingface, kilocode, kimi-coding, kimi-coding-cn, minimax, minimax-cn, nous, nvidia, ollama-cloud, openai-codex, opencode-go, opencode-zen, openrouter, qwen-oauth, stepfun, xai, xiaomi, zai)
⚠ Config version outdated (v16 → v22) (new settings available)

◆ Auth Providers
⚠ Nous Portal auth (not logged in)
✓ OpenAI Codex auth (logged in)
⚠ Google Gemini OAuth (not logged in)
✓ codex CLI

◆ Directory Structure
✓ ~/.hermes directory exists
✓ ~/.hermes/cron/ exists
✓ ~/.hermes/sessions/ exists
✓ ~/.hermes/logs/ exists
✓ ~/.hermes/skills/ exists
✓ ~/.hermes/memories/ exists
✓ ~/.hermes/SOUL.md exists (persona configured)
✓ ~/.hermes/memories/ directory exists
→ MEMORY.md not created yet (will be created when the agent first writes a memory)
→ USER.md not created yet (will be created when the agent first writes a memory)
✓ ~/.hermes/state.db exists (91 sessions)

◆ Command Installation
✓ Venv entry point exists (.venv/bin/hermes)
⚠ ~/.local/bin/hermes points to wrong target (→ /Users/leongong/Library/Python/3.12/bin/hermes, expected → /Users/leongong/Desktop/LeonProjects/gho_workspace/hermes-agent/.venv/bin/hermes)

◆ External Tools
✓ git
✓ ripgrep (rg) (faster file search)
✓ docker (optional)
✓ Node.js
⚠ agent-browser not installed (run: npm install)

◆ API Connectivity
⚠ OpenRouter API (not configured)
Checking Kimi / Moonshot API...
⚠ Kimi / Moonshot (HTTP 402)

◆ Submodules
⚠ tinker-atropos not found (run: git submodule update --init --recursive)

◆ Tool Availability
✓ browser
✓ clarify
✓ code_execution
✓ cronjob
✓ delegation
✓ file
✓ image_gen
✓ memory
✓ terminal
✓ session_search
✓ skills
✓ todo
✓ tts
✓ vision
⚠ browser-cdp (system dependency not met)
⚠ discord (missing DISCORD_BOT_TOKEN)
⚠ feishu_doc (system dependency not met)
⚠ feishu_drive (system dependency not met)
⚠ homeassistant (system dependency not met)
⚠ moa (missing OPENROUTER_API_KEY)
⚠ rl (missing TINKER_API_KEY, WANDB_API_KEY)
⚠ messaging (system dependency not met)
⚠ web (missing EXA_API_KEY, PARALLEL_API_KEY, TAVILY_API_KEY, FIRECRAWL_API_KEY, FIRECRAWL_API_URL)

◆ Skills Hub
✓ Skills Hub directory exists
⚠ No GITHUB_TOKEN (60 req/hr rate limit — set in ~/.hermes/.env for better rates)

◆ Memory Provider
✓ Built-in memory active (no external provider configured — this is fine)

────────────────────────────────────────────────────────────
Found 4 issue(s) to address:

  1. model.provider 'kimi-coding' is unknown. Valid providers: ai-gateway, alibaba, anthropic, arcee, auto, bedrock, copilot, copilot-acp, custom, deepseek, gemini, google-gemini-cli, huggingface, kilocode, kimi-coding, kimi-coding-cn, minimax, minimax-cn, nous, nvidia, ollama-cloud, openai-codex, opencode-go, opencode-zen, openrouter, qwen-oauth, stepfun, xai, xiaomi, zai. Fix: run 'hermes config set model.provider <valid_provider>'
  2. Run 'hermes doctor --fix' or 'hermes setup' to migrate config
  3. Broken symlink at ~/.local/bin/hermes — run 'hermes doctor --fix'
  4. Run 'hermes setup' to configure missing API keys for full tool access

Tip: run 'hermes doctor --fix' to auto-fix what's possible. to validate and saved custom providers alongside built-in providers

  • add regression tests covering both the picker and doctor diagnostics for named providers from

Closes #14850

Testing

  • python3 -m pytest -o addopts= tests/hermes_cli/test_setup.py
  • python3 -m pytest -o addopts= tests/hermes_cli/test_doctor.py

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard area/config Config system, migrations, profiles labels Apr 24, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Fixes #14850 — user-defined providers misclassified as unknown by doctor and model commands. Also related to #12919 (provider validation regressions).

@teknium1

Copy link
Copy Markdown
Contributor

Merged via #15083 — your commit was cherry-picked onto current main with authorship preserved in git log.

Clean, focused fix. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles 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.

Custom providers in config.providers are misclassified as unknown by hermes model and doctor

3 participants