hermes - 💡(How to fix) Fix [Bug]: Custom endpoint: ChatCompletions returns content, but Hermes treats response as empty (v0.14.0)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

When using a custom OpenAI-compatible endpoint, the server returns a normal ChatCompletions response with choices[0].message.content, but Hermes CLI reports empty response and retries, then fails with "Model returned no content".

Error Message

Attach relevant lines from:

  • ~/.hermes/logs/agent.log filtered by the session id

Root Cause

Root Cause Analysis (optional)

Code Example

## Summary
When using a custom OpenAI-compatible endpoint, the server returns a normal ChatCompletions response with `choices[0].message.content`, but Hermes CLI reports empty response and retries, then fails with "Model returned no content".
## Hermes version / environment
- Hermes: v0.14.0 (2026.5.16)
- OS: macOS (darwin 26.3.1)
- Provider: custom endpoint
- api_mode: chat_completions
- base_url: https://chatgpt.58corp.com/api/v1
- model: chatling-plus-1126
## Repro steps
1. Configure custom endpoint with the base_url + api_key + model above.
2. Run:
   - `hermes chat -q "你好"`
   - (also reproduces with `hermes -z "你好"`)
## Expected
Hermes prints the assistant text returned by the server.
## Actual
Hermes logs show:
- "Empty response (no content or reasoning) — retry 1/3"
- ...
- "Model returned no content after all retries"
## Evidence
### curl works (same endpoint)
POST https://chatgpt.58corp.com/api/v1/chat/completions
Response includes:
- object: "chat.completion"
- choices[0].message.content: "你好!有什么我可以帮你的吗?..."
### Hermes request dump
Attached: ~/.hermes/sessions/request_dump_<...>.json
The dump shows Hermes is calling:
- URL: https://chatgpt.58corp.com/api/v1/chat/completions
- Headers: Authorization: Bearer ...
- Body: { model, messages, tools ... }
## Logs
Attach relevant lines from:
- `~/.hermes/logs/agent.log` filtered by the session id

---
RAW_BUFFERClick to expand / collapse

Bug Description

Summary

When using a custom OpenAI-compatible endpoint, the server returns a normal ChatCompletions response with choices[0].message.content, but Hermes CLI reports empty response and retries, then fails with "Model returned no content".

Hermes version / environment

  • Hermes: v0.14.0 (2026.5.16)
  • OS: macOS (darwin 26.3.1)
  • Provider: custom endpoint
  • api_mode: chat_completions
  • base_url: https://chatgpt.58corp.com/api/v1
  • model: chatling-plus-1126

Repro steps

  1. Configure custom endpoint with the base_url + api_key + model above.
  2. Run:
    • hermes chat -q "你好"
    • (also reproduces with hermes -z "你好")

Expected

Hermes prints the assistant text returned by the server.

Actual

Hermes logs show:

  • "Empty response (no content or reasoning) — retry 1/3"
  • ...
  • "Model returned no content after all retries"

Steps to Reproduce

Summary

When using a custom OpenAI-compatible endpoint, the server returns a normal ChatCompletions response with choices[0].message.content, but Hermes CLI reports empty response and retries, then fails with "Model returned no content".

Hermes version / environment

  • Hermes: v0.14.0 (2026.5.16)
  • OS: macOS (darwin 26.3.1)
  • Provider: custom endpoint
  • api_mode: chat_completions
  • base_url: https://chatgpt.58corp.com/api/v1
  • model: chatling-plus-1126

Repro steps

  1. Configure custom endpoint with the base_url + api_key + model above.
  2. Run:
    • hermes chat -q "你好"
    • (also reproduces with hermes -z "你好")

Expected

Hermes prints the assistant text returned by the server.

Actual

Hermes logs show:

  • "Empty response (no content or reasoning) — retry 1/3"
  • ...
  • "Model returned no content after all retries"

Expected Behavior

Summary

When using a custom OpenAI-compatible endpoint, the server returns a normal ChatCompletions response with choices[0].message.content, but Hermes CLI reports empty response and retries, then fails with "Model returned no content".

Hermes version / environment

  • Hermes: v0.14.0 (2026.5.16)
  • OS: macOS (darwin 26.3.1)
  • Provider: custom endpoint
  • api_mode: chat_completions
  • base_url: https://chatgpt.58corp.com/api/v1
  • model: chatling-plus-1126

Repro steps

  1. Configure custom endpoint with the base_url + api_key + model above.
  2. Run:
    • hermes chat -q "你好"
    • (also reproduces with hermes -z "你好")

Expected

Hermes prints the assistant text returned by the server.

Actual

Hermes logs show:

  • "Empty response (no content or reasoning) — retry 1/3"
  • ...
  • "Model returned no content after all retries"

Actual Behavior

Summary

When using a custom OpenAI-compatible endpoint, the server returns a normal ChatCompletions response with choices[0].message.content, but Hermes CLI reports empty response and retries, then fails with "Model returned no content".

Hermes version / environment

  • Hermes: v0.14.0 (2026.5.16)
  • OS: macOS (darwin 26.3.1)
  • Provider: custom endpoint
  • api_mode: chat_completions
  • base_url: https://chatgpt.58corp.com/api/v1
  • model: chatling-plus-1126

Repro steps

  1. Configure custom endpoint with the base_url + api_key + model above.
  2. Run:
    • hermes chat -q "你好"
    • (also reproduces with hermes -z "你好")

Expected

Hermes prints the assistant text returned by the server.

Actual

Hermes logs show:

  • "Empty response (no content or reasoning) — retry 1/3"
  • ...
  • "Model returned no content after all retries"

Affected Component

CLI (interactive chat)

Messaging Platform (if gateway-related)

No response

Debug Report

## Summary
When using a custom OpenAI-compatible endpoint, the server returns a normal ChatCompletions response with `choices[0].message.content`, but Hermes CLI reports empty response and retries, then fails with "Model returned no content".
## Hermes version / environment
- Hermes: v0.14.0 (2026.5.16)
- OS: macOS (darwin 26.3.1)
- Provider: custom endpoint
- api_mode: chat_completions
- base_url: https://chatgpt.58corp.com/api/v1
- model: chatling-plus-1126
## Repro steps
1. Configure custom endpoint with the base_url + api_key + model above.
2. Run:
   - `hermes chat -q "你好"`
   - (also reproduces with `hermes -z "你好"`)
## Expected
Hermes prints the assistant text returned by the server.
## Actual
Hermes logs show:
- "Empty response (no content or reasoning) — retry 1/3"
- ...
- "Model returned no content after all retries"
## Evidence
### curl works (same endpoint)
POST https://chatgpt.58corp.com/api/v1/chat/completions
Response includes:
- object: "chat.completion"
- choices[0].message.content: "你好!有什么我可以帮你的吗?..."
### Hermes request dump
Attached: ~/.hermes/sessions/request_dump_<...>.json
The dump shows Hermes is calling:
- URL: https://chatgpt.58corp.com/api/v1/chat/completions
- Headers: Authorization: Bearer ...
- Body: { model, messages, tools ... }
## Logs
Attach relevant lines from:
- `~/.hermes/logs/agent.log` filtered by the session id

Operating System

macOS 15.2

Python Version

3.12.6

Hermes Version

v0.14.0 (2026.5.16)

Additional Logs / Traceback (optional)

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

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING