hermes - 💡(How to fix) Fix [Bug]: Transient APIConnectionError on custom — rebuilt client, waiting 6s before one last primary attempt.

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…

Error Message

📝 Error: Connection error. 📝 Error: Connection error. 📝 Error: Connection error. 📝 Error: Connection error. API call failed after 3 retries: Connection error. 2026-06-05 10:52:39,631 WARNING [20260605_105208_61a7a5] agent.conversation_loop: Retrying API call in 4.093806246950519s (attempt 2/3) thread=Thread-4 (run_agent):140012024747584 provider=custom base_url=https://feiai.chat/v1 model=qwen3.5-27b error=Connection error. 2026-06-05 10:52:45,144 INFO agent.chat_completion_helpers: Streaming failed before delivery: Connection error. 2026-06-05 10:52:45,145 WARNING [20260605_105208_61a7a5] agent.conversation_loop: API call failed (attempt 3/3) error_type=APIConnectionError thread=Thread-4 (run_agent):140012024747584 provider=custom base_url=https://feiai.chat/v1 model=qwen3.5-27b summary=Connection error. 2026-06-05 10:52:45,146 ERROR [20260605_105208_61a7a5] agent.conversation_loop: API call failed after 3 retries. Connection error. | provider=custom model=qwen3.5-27b msgs=2 tokens=~8,933

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Code Example

2026-06-05 10:52:39,631 WARNING [20260605_105208_61a7a5] agent.conversation_loop: Retrying API call in 4.093806246950519s (attempt 2/3) thread=Thread-4 (run_agent):140012024747584 provider=custom base_url=https://feiai.chat/v1 model=qwen3.5-27b error=Connection error.
2026-06-05 10:52:43,841 INFO run_agent: OpenAI client created (chat_completion_stream_request, shared=False) thread=Thread-10 (_call):140012016354880 provider=custom base_url=https://feiai.chat/v1 model=qwen3.5-27b
2026-06-05 10:52:45,144 INFO agent.chat_completion_helpers: Streaming failed before delivery: Connection error.
2026-06-05 10:52:45,145 INFO run_agent: OpenAI client closed (stream_request_complete, shared=False, tcp_force_closed=0) thread=Thread-10 (_call):140012016354880 provider=custom base_url=https://feiai.chat/v1 model=qwen3.5-27b
2026-06-05 10:52:45,145 WARNING [20260605_105208_61a7a5] run_agent: Credential pool provider mismatch: pool=custom:qwen3.5-27b, agent=custom — skipping pool mutation to avoid cross-provider contamination
2026-06-05 10:52:45,145 WARNING [20260605_105208_61a7a5] agent.conversation_loop: API call failed (attempt 3/3) error_type=APIConnectionError thread=Thread-4 (run_agent):140012024747584 provider=custom base_url=https://feiai.chat/v1 model=qwen3.5-27b summary=Connection error.
2026-06-05 10:52:45,146 ERROR [20260605_105208_61a7a5] agent.conversation_loop: API call failed after 3 retries. Connection error. | provider=custom model=qwen3.5-27b msgs=2 tokens=~8,933

---
RAW_BUFFERClick to expand / collapse

Bug Description

My Env:

  1. with proxy config: (hermes) root@DESKTOP-S85OUTD:/mnt/d/hermes-agent# env | grep -i proxy no_proxy=localhost,127.0.0.1,localaddress,xxx.com https_proxy=xxxx NO_PROXY=xxxxxxxxxxx HTTPS_PROXY=xxxx HTTP_PROXY=xxxxx http_proxy=xxxx

  2. curl the target model is OK: (hermes) root@DESKTOP-S85OUTD:/mnt/d/hermes-agent#curl -k -X POST https://xxx.chat/v1/chat/completions -H 'Content-Type: application/json' -H 'Authorization: xxxx' -d '{"model": "qwen3.5-27b","messages": [{"role": "user", "content": "Say this is a test!"}],"temperature": 0.7}'

Steps to Reproduce

My BUG: ──────────────────────────────────────── ● hello Initializing agent... ────────────────────────────────────────

🔁 Transient APIConnectionError on custom — rebuilt client, waiting 6s before one last primary attempt. ⚠️ API call failed (attempt 1/3): APIConnectionError 🔌 Provider: custom Model: qwen3.5-27b 🌐 Endpoint: https://feiai.chat/v1 📝 Error: Connection error. ⏱️ Elapsed: 1.75s Context: 2 msgs, ~8,933 tokens ⏳ Retrying in 2.5s (attempt 1/3)... ⚠️ API call failed (attempt 2/3): APIConnectionError 🔌 Provider: custom Model: qwen3.5-27b 🌐 Endpoint: https://feiai.chat/v1 📝 Error: Connection error. ⏱️ Elapsed: 5.67s Context: 2 msgs, ~8,933 tokens ⏳ Retrying in 4.9s (attempt 2/3)... ⚠️ API call failed (attempt 3/3): APIConnectionError 🔌 Provider: custom Model: qwen3.5-27b 🌐 Endpoint: https://feiai.chat/v1 📝 Error: Connection error. ⏱️ Elapsed: 11.98s Context: 2 msgs, ~8,933 tokens ⚠️ API call failed (attempt 1/3): APIConnectionError 🔌 Provider: custom Model: qwen3.5-27b 🌐 Endpoint: https://feiai.chat/v1 📝 Error: Connection error.

 API call failed after 3 retries: Connection error.

Expected Behavior

response a assistant sentence at least

Actual Behavior

🔁 Transient APIConnectionError on custom — rebuilt client, waiting 6s before one last primary attempt.

Affected Component

CLI (interactive chat)

Messaging Platform (if gateway-related)

No response

Debug Report

2026-06-05 10:52:39,631 WARNING [20260605_105208_61a7a5] agent.conversation_loop: Retrying API call in 4.093806246950519s (attempt 2/3) thread=Thread-4 (run_agent):140012024747584 provider=custom base_url=https://feiai.chat/v1 model=qwen3.5-27b error=Connection error.
2026-06-05 10:52:43,841 INFO run_agent: OpenAI client created (chat_completion_stream_request, shared=False) thread=Thread-10 (_call):140012016354880 provider=custom base_url=https://feiai.chat/v1 model=qwen3.5-27b
2026-06-05 10:52:45,144 INFO agent.chat_completion_helpers: Streaming failed before delivery: Connection error.
2026-06-05 10:52:45,145 INFO run_agent: OpenAI client closed (stream_request_complete, shared=False, tcp_force_closed=0) thread=Thread-10 (_call):140012016354880 provider=custom base_url=https://feiai.chat/v1 model=qwen3.5-27b
2026-06-05 10:52:45,145 WARNING [20260605_105208_61a7a5] run_agent: Credential pool provider mismatch: pool=custom:qwen3.5-27b, agent=custom — skipping pool mutation to avoid cross-provider contamination
2026-06-05 10:52:45,145 WARNING [20260605_105208_61a7a5] agent.conversation_loop: API call failed (attempt 3/3) error_type=APIConnectionError thread=Thread-4 (run_agent):140012024747584 provider=custom base_url=https://feiai.chat/v1 model=qwen3.5-27b summary=Connection error.
2026-06-05 10:52:45,146 ERROR [20260605_105208_61a7a5] agent.conversation_loop: API call failed after 3 retries. Connection error. | provider=custom model=qwen3.5-27b msgs=2 tokens=~8,933

Operating System

Ubuntu2204

Python Version

No response

Hermes Version

No response

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