Skip to content

Chat does not work - 401 error #263

@Dexus

Description

@Dexus

It looks like it use a wrong API_KEY here. Maybe the documentation to setup it correctly would be a good idea

git diff src/server/openai-compat-api.ts
diff --git a/src/server/openai-compat-api.ts b/src/server/openai-compat-api.ts
index f873414a..f37792d5 100644
--- a/src/server/openai-compat-api.ts
+++ b/src/server/openai-compat-api.ts
@@ -1,7 +1,7 @@
 import { CLAUDE_API } from './gateway-capabilities'

 /** Optional bearer token for authenticated OpenAI-compatible endpoints (e.g. Codex OAuth). */
-const BEARER_TOKEN = process.env.CLAUDE_API_TOKEN || ''
+const BEARER_TOKEN = process.env.CLAUDE_API_TOKEN || process.env.HERMES_API_TOKEN || ''

 /** Cached first available model from /v1/models — used as fallback when no model is specified. */
 let _cachedDefaultModel: string | null = null

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