hermes - 💡(How to fix) Fix DeepSeek provider: stream retry credential loss + 600s server-side stream limit [1 participants]

Official PRs (…)
ON THIS PAGE

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…
GitHub stats
NousResearch/hermes-agent#23286Fetched 2026-05-11 03:30:10
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×4

Two related issues when using DeepSeek provider via Anthropic-compatible endpoint (https://api.deepseek.com/anthropic) with long-running sessions:

Error Message

After a ReadTimeout stream drop, retry fails with credential error: error=Missing credentials. Please pass an api_key...

Root Cause

Two related issues when using DeepSeek provider via Anthropic-compatible endpoint (https://api.deepseek.com/anthropic) with long-running sessions:

Fix Action

Workaround

Higher request_timeout_seconds does not help (600s limit is server-side). Sessions under 10 minutes work fine. Enabling streaming.enabled=true may help with connection management.

Code Example

Stream drop on attempt 2/3 -- retrying.
  provider=deepseek base_url=https://api.deepseek.com/anthropic
  error_type=ReadTimeout elapsed=601.51s

Failed to rebuild shared OpenAI client (stream_retry_pool_cleanup)
  error=Missing credentials. Please pass an api_key...

---

http_status=200 bytes=775 chunks=4 elapsed=601.51s ttfb=1.50s upstream=[server=openresty]
http_status=200 bytes=58354 chunks=287 elapsed=605.87s ttfb=0.89s upstream=[server=openresty]
http_status=200 bytes=41394 chunks=205 elapsed=604.86s ttfb=0.99s upstream=[server=openresty]
RAW_BUFFERClick to expand / collapse

Summary

Two related issues when using DeepSeek provider via Anthropic-compatible endpoint (https://api.deepseek.com/anthropic) with long-running sessions:

Issue 1: Stream retry breaks credential pool

After a ReadTimeout stream drop, retry fails with credential error:

Stream drop on attempt 2/3 -- retrying.
  provider=deepseek base_url=https://api.deepseek.com/anthropic
  error_type=ReadTimeout elapsed=601.51s

Failed to rebuild shared OpenAI client (stream_retry_pool_cleanup)
  error=Missing credentials. Please pass an api_key...

The credential context from the initial connection is lost when rebuilding the client for stream retry.

Issue 2: DeepSeek 600s server-side stream limit

DeepSeek's Anthropic-compatible endpoint drops streams after ~600 seconds:

http_status=200 bytes=775 chunks=4 elapsed=601.51s ttfb=1.50s upstream=[server=openresty]
http_status=200 bytes=58354 chunks=287 elapsed=605.87s ttfb=0.89s upstream=[server=openresty]
http_status=200 bytes=41394 chunks=205 elapsed=604.86s ttfb=0.99s upstream=[server=openresty]
  • HTTP 200 returned (connection established successfully)
  • TTFB is fast (~1s)
  • Connection drops at ~600s regardless of request_timeout_seconds (tested at 1200s)
  • Upstream is openresty (nginx), suggesting server-side proxy timeout

Environment

  • Hermes Agent v0.13.0
  • Provider: deepseek (via Anthropic-compatible endpoint)
  • Model: deepseek-v4-pro
  • Config: request_timeout_seconds=1200, stale_timeout_seconds=1800, streaming.enabled=true
  • macOS 26.2, Intel x86_64

Workaround

Higher request_timeout_seconds does not help (600s limit is server-side). Sessions under 10 minutes work fine. Enabling streaming.enabled=true may help with connection management.

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

hermes - 💡(How to fix) Fix DeepSeek provider: stream retry credential loss + 600s server-side stream limit [1 participants]