Skip to content

OpenRouter model tencent/hy3-preview:free fails with API key not found error in WebUI #1744

@sdttt613-glitch

Description

@sdttt613-glitch

Bug: OpenRouter model tencent/hy3-preview:free fails with API key not found error in WebUI

Environment

  • hermes-webui (nesquena/hermes-webui)
  • Hermes agent: nousresearch/hermes-agent (Docker)
  • OPENROUTER_API_KEY correctly configured and confirmed present in container environment

Symptoms

Selecting Hy3 Preview (free) from the WebUI model dropdown produces:

Error: Provider 'openrouter:tencent/hy3-preview' is set in config.yaml but no API key was found.
Set the OPENROUTER:TENCENT/HY3-PREVIEW_API_KEY environment variable, or switch to a different
provider with hermes model.

The same model works correctly via Telegram gateway with the same OPENROUTER_API_KEY.

Root Cause

In api/config.py line 629, the hy3 model entry is missing the openrouter/ namespace prefix
that all other OpenRouter models use:

# Broken — missing openrouter/ prefix
{"provider": "OpenRouter", "id": "tencent/hy3-preview:free", "label": "Hy3 Preview (free)"},

# Other OpenRouter models correctly have the prefix
{"provider": "OpenRouter", "id": "openrouter/elephant-alpha", "label": "Elephant Alpha (free)"},
{"provider": "OpenRouter", "id": "openrouter/owl-alpha",      "label": "Owl Alpha (free)"},

The routing logic in config.py line 1367 identifies OpenRouter models by checking for the
openrouter/ prefix:

if config_provider == "openrouter":
    return model_id, "openrouter", config_base_url

Without the prefix, tencent/hy3-preview:free falls through to incorrect provider resolution,
producing the malformed openrouter:tencent/hy3-preview provider string which Hermes cannot
match to OPENROUTER_API_KEY.

Fix

Add the openrouter/ prefix to the hy3 model entry in api/config.py line 629:

# Fixed
{"provider": "OpenRouter", "id": "openrouter/tencent/hy3-preview:free", "label": "Hy3 Preview (free)"},

Notes

This is primarily an OpenRouter naming inconsistency — they published tencent/hy3-preview:free
without the standard openrouter/ namespace prefix used by their other free models. A more robust
fix would add a fallback in the routing logic to handle OpenRouter models that have
"provider": "OpenRouter" set but lack the openrouter/ id prefix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions