Skip to content

[Bug]: 'No inference provider configured' in interactive chat despite '-z' working, openai-codex provider (v0.13.0) #24433

Closed as not planned

Description

@Proto2000

Description

Interactive chat mode (hermes chat / hermes --tui chat / profile-aliased equivalents) reports "No inference provider configured" and refuses to send the first message, even though:

  • hermes config show confirms provider: openai-codex and model: gpt-5.5
  • The same profile's hermes -z "..." one-shot mode runs inference successfully against openai-codex with no error
  • hermes auth status shows the openai-codex OAuth token as valid
  • The gateway service (which uses its own provider-resolution path) successfully serves inference to a connected Telegram client using the same profile config

Looks like chat mode and -z mode (and gateway mode) use different provider-resolution paths and chat mode misses the openai-codex setting somehow.

Reproduction

hermes profile create personal
hermes auth add openai-codex --type oauth   # complete the OAuth flow
hermes -p personal config set provider openai-codex
hermes -p personal config set model gpt-5.5

# This works — inference returns a real response:
hermes -p personal -z "say OK"
# → OK

# This fails immediately:
hermes -p personal chat
# Send any message → "No inference provider configured. Run 'hermes model' to choose a provider"

Environment

  • Hermes Agent v0.13.0 (2026.5.7) — macOS Homebrew install
  • Python 3.14.4
  • OpenAI SDK 2.35.0
  • macOS 15.5 (24F74)
  • Provider: openai-codex (OAuth, not API key)
  • Model: gpt-5.5

Workaround

Stick to hermes -z "..." non-interactive mode for CLI use, or run inference through the gateway service. The bug doesn't block gateway operation.

What I expected

Chat mode should resolve providers the same way -z mode and the gateway do.

Activity

  1. added
    type/bugSomething isn't working
    P1High — major feature broken, no workaround
    comp/cliCLI entry point, hermes_cli/, setup wizard
    on May 12, 2026
  2. MindSetFPS commented on May 15, 2026

    @MindSetFPS

    happened to me on docker, it worked as expect when i configured it, about 18 hours ago. im using selfhosted ollama as a provider.
    $hermes -z "..." also works for me.

    talking to the model through the gateway after running the previous command seems to have made it work, but the model rephrased the error and gave me instructions to fix it.

  3. calebsmithdev commented on Jun 7, 2026

    @calebsmithdev

    Also ran into this in a Docker environment. My agent fixed itself and here was the information it generated and I gave it to the other agents to reconcile and fix the issue:

    Fix Mattermost Hermes provider auth failure in this container.
        
        The gateway runs as user hermes with HERMES_HOME=/opt/data. The error is:
        “Provider authentication failed: No inference provider configured.”
        
        Check whether /opt/data/config.yaml, /opt/data/auth.json, or /opt/data/.env are owned by root:root or unreadable by hermes. If so, fix ownership/permissions:
        
        chown hermes:hermes /opt/data/config.yaml /opt/data/.env /opt/data/auth.json
        chmod 640 /opt/data/config.yaml
        chmod 600 /opt/data/.env /opt/data/auth.json
        
        Then restart the Hermes gateway process safely by terminating the existing hermes gateway run process as user hermes and letting supervision restart it.
        
        Verify as the hermes user, not root:
        
        runuser -u hermes -- /opt/hermes/bin/hermes config
        runuser -u hermes -- /opt/hermes/bin/hermes auth list
        runuser -u hermes -- /opt/hermes/bin/hermes chat -q 'Reply with exactly: ok' --quiet --source cli
        
        Do not run hermes model, hermes login, or hermes auth as root. If reauth/model selection is needed, run:
        
        runuser -u hermes -- /opt/hermes/bin/hermes login --provider openai-codex
        runuser -u hermes -- /opt/hermes/bin/hermes model
        
        Report the final file ownership, gateway pid, configured provider/model, auth provider, and chat test result.
    
  4. teknium1 commented on Jun 28, 2026

    @teknium1
    Collaborator

    Verified against current main — this is no longer reproducible, closing as fixed.

    Root cause (as reported): The "No inference provider configured" error originates in hermes_cli/auth.py and only fires when the provider resolver is called with requested="auto". In v0.13.0, interactive hermes chat was reaching that auto-fallback path while -z and the gateway passed the configured provider — exactly the divergence you described.

    Current state: hermes chat and hermes -z now share a single resolution path — both call _ensure_runtime_credentials() → resolve_runtime_provider(requested=self.requested_provider). There's no longer a separate chat-mode path that drops the configured provider.

    E2E check: I reproduced your exact setup against current main — a profile with model.provider: openai-codex + model: gpt-5.5, with all *_API_KEY / HERMES_INFERENCE_PROVIDER env vars blanked (OAuth-only). Constructing the CLI resolves requested_provider = 'openai-codex' (not 'auto'), so the error branch is unreachable. Chat mode now resolves providers identically to -z and the gateway.

    Note on the Docker reports in the thread (@calebsmithdev / @briandevans): those hit the same error string but from a different cause — HERMES_HOME files (config.yaml / auth.json / .env) owned root:root and unreadable by the service user. That's an environment/permissions issue, not the resolution-path bug, and chown hermes:hermes + correct perms resolves it.

    Thanks for the detailed reproduction and the gateway/-z cross-check — that comparison is exactly what pinpointed the divergent path. If you still see this on a current build (hermes update), please reopen with hermes doctor output.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High — major feature broken, no workaroundcomp/cliCLI entry point, hermes_cli/, setup wizardprovider/openaiOpenAI / Codex Responses APItype/bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions