Skip to content

[Bug]: Openrouter api key not automatically migrated on openclaw migration #1580

@akshaynexus

Description

@akshaynexus

Bug Description

After running the OpenClaw migration during Hermes agent setup, the OPENROUTER_API_KEY is not copied/set in the Hermes .env file.

When using the agent in Telegram:
⚠️ Error code: 401 - {'error': {'message': 'No cookie auth credentials found', 'code': 401}}

Actual root cause (from logs): missing OpenRouter API key.
The Telegram error message is misleading and doesn't point to the real problem.

Impact: Agent fails to work in Telegram after migration until key is manually added.

Suggested Fix:

  1. After migration completes, manually add the key to Hermes .env:

    OPENROUTER_API_KEY=sk-or-v1-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    
  2. Restart the Hermes agent / container.

Ideal long-term fix (for devs):
Update the migration script to explicitly copy or prompt for OPENROUTER_API_KEY and write it to the target .env file (or handle via config migration logic).

Manually adding the key resolves it immediately.

Steps to Reproduce

Have existing openclaw setup with Openrouter provider

Use the migrate from openclaw option

Try to. Message the bot on Tg

Expected Behavior

Should have a working bot on telegram

Actual Behavior

Got the error mentioned ions above

Affected Component

Gateway (Telegram/Discord/Slack/WhatsApp)

Messaging Platform (if gateway-related)

Telegram

Operating System

Popos lts

Python Version

3.14

Hermes Version

0.2.0

Relevant Logs / Traceback

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions