hermes - 💡(How to fix) Fix [Bug]: Cannot connect to LM Studio

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: HTTP 400: Error code: 400 ⚠️ Non-retryable error (HTTP 400) — trying fallback... Loop thread traceback (most recent call last): (╥_╥) error, retrying... WARNING run_agent: API call failed (attempt 1/3) error_type=BadRequestError thread=asyncio_0:3480 provider=lmstudio base_url=http://localhost:1234/v1 model=qwen/qwen3-coder-30b summary=HTTP 400: Error code: 400 📝 Error: HTTP 400: Error code: 400 ⚠️ Non-retryable error (HTTP 400) — trying fallback... ❌ Non-retryable error (HTTP 400): HTTP 400: Error code: 400 ❌ Non-retryable client error (HTTP 400). Aborting. 💡 This type of error won't be fixed by retrying. ERROR root: Non-retryable client error: Error code: 400 ⚠️ Non-retryable error (HTTP 400) — trying fallback... ❌ Non-retryable error (HTTP 400): HTTP 400: Error code: 400 ❌ Non-retryable error (HTTP 400): HTTP 400: Error code: 400 ❌ Non-retryable client error (HTTP 400). Aborting. 💡 This type of error won't be fixed by retrying. ERROR root: Non-retryable client error: Error code: 400

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Fix Action

Fix / Workaround

(╥_╥) error, retrying... WARNING run_agent: API call failed (attempt 1/3) error_type=BadRequestError thread=asyncio_0:3480 provider=lmstudio base_url=http://localhost:1234/v1 model=qwen/qwen3-coder-30b summary=HTTP 400: Error code: 400 ⚠️ API call failed (attempt 1/3): BadRequestError [HTTP 400] 🔌 Provider: lmstudio Model: qwen/qwen3-coder-30b 🌐 Endpoint: http://localhost:1234/v1 📝 Error: HTTP 400: Error code: 400 ⏱️ Elapsed: 5.06s Context: 4 msgs, ~3,829 tokens ⚠️ Non-retryable error (HTTP 400) — trying fallback... 🧾 Request debug dump written to: C:\Users\VYRAL\AppData\Local\hermes\sessions\request_dump_20260510_152712_d29d749c_20260512_150825_344573.json ❌ Non-retryable error (HTTP 400): HTTP 400: Error code: 400 ❌ Non-retryable client error (HTTP 400). Aborting. 🔌 Provider: lmstudio Model: qwen/qwen3-coder-30b 🌐 Endpoint: http://localhost:1234/v1 💡 This type of error won't be fixed by retrying. ERROR root: Non-retryable client error: Error code: 400`

❌ Non-retryable error (HTTP 400): HTTP 400: Error code: 400 ❌ Non-retryable client error (HTTP 400). Aborting. 🔌 Provider: lmstudio Model: qwen/qwen3-coder-30b 🌐 Endpoint: http://localhost:1234/v1 💡 This type of error won't be fixed by retrying. ERROR root: Non-retryable client error: Error code: 400

Code Example

Report https://dpaste.com/FJZD27H84

---
RAW_BUFFERClick to expand / collapse

Bug Description

I configured it correctly and use the same endpoint URL that my other AI cli tools use successfully.

API call failed (attempt 1/3): BadRequestError [HTTP 400] 🔌 Provider: lmstudio Model: qwen/qwen3-coder-30b 🌐 Endpoint: http://localhost:1234/v1 📝 Error: HTTP 400: Error code: 400 ⏱️ Elapsed: 5.06s Context: 4 msgs, ~3,829 tokens ⚠️ Non-retryable error (HTTP 400) — trying fallback...

` WARNING discord.gateway: Shard ID None heartbeat blocked for more than 20 seconds. Loop thread traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "C:\Users\VYRAL\AppData\Local\hermes\hermes-agent\hermes_cli\main.py", line 11696, in <module> main() File "C:\Users\VYRAL\AppData\Local\hermes\hermes-agent\hermes_cli\main.py", line 11690, in main args.func(args) File "C:\Users\VYRAL\AppData\Local\hermes\hermes-agent\hermes_cli\main.py", line 1509, in cmd_gateway gateway_command(args) File "C:\Users\VYRAL\AppData\Local\hermes\hermes-agent\hermes_cli\gateway.py", line 4973, in gateway_command return _gateway_command_inner(args) File "C:\Users\VYRAL\AppData\Local\hermes\hermes-agent\hermes_cli\gateway.py", line 4999, in _gateway_command_inner run_gateway(verbose, quiet=quiet, replace=replace) File "C:\Users\VYRAL\AppData\Local\hermes\hermes-agent\hermes_cli\gateway.py", line 3233, in run_gateway success = asyncio.run(start_gateway(replace=replace, verbosity=verbosity)) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\runners.py", line 195, in run return runner.run(main) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\runners.py", line 118, in run return self._loop.run_until_complete(task) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 712, in run_until_complete self.run_forever() File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 683, in run_forever self._run_once() File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 2050, in _run_once handle._run() File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\events.py", line 89, in _run self._context.run(self._callback, *self._args) File "C:\Users\VYRAL\AppData\Local\hermes\hermes-agent\gateway\platforms\base.py", line 2853, in _process_message_background response = await self._message_handler(event) File "C:\Users\VYRAL\AppData\Local\hermes\hermes-agent\gateway\run.py", line 6252, in _handle_message _agent_result = await self._handle_message_with_agent(event, source, _quick_key, _run_generation) File "C:\Users\VYRAL\AppData\Local\hermes\hermes-agent\gateway\run.py", line 6849, in _handle_message_with_agent _hyg_context_length = get_model_context_length( File "C:\Users\VYRAL\AppData\Local\hermes\hermes-agent\agent\model_metadata.py", line 1359, in get_model_context_length local_ctx = _query_local_context_length(model, base_url, api_key=api_key) File "C:\Users\VYRAL\AppData\Local\hermes\hermes-agent\agent\model_metadata.py", line 987, in _query_local_context_length server_type = detect_local_server_type(base_url, api_key=api_key) File "C:\Users\VYRAL\AppData\Local\hermes\hermes-agent\agent\model_metadata.py", line 455, in detect_local_server_type r = client.get(f"{server_url}/v1/props") File "C:\Users\VYRAL\AppData\Local\hermes\hermes-agent\venv\Lib\site-packages\httpx_client.py", line 1053, in get return self.request( File "C:\Users\VYRAL\AppData\Local\hermes\hermes-agent\venv\Lib\site-packages\httpx_client.py", line 825, in request return self.send(request, auth=auth, follow_redirects=follow_redirects) File "C:\Users\VYRAL\AppData\Local\hermes\hermes-agent\venv\Lib\site-packages\httpx_client.py", line 914, in send response = self._send_handling_auth( File "C:\Users\VYRAL\AppData\Local\hermes\hermes-agent\venv\Lib\site-packages\httpx_client.py", line 942, in _send_handling_auth response = self._send_handling_redirects( File "C:\Users\VYRAL\AppData\Local\hermes\hermes-agent\venv\Lib\site-packages\httpx_client.py", line 979, in _send_handling_redirects response = self._send_single_request(request) File "C:\Users\VYRAL\AppData\Local\hermes\hermes-agent\venv\Lib\site-packages\httpx_client.py", line 1014, in _send_single_request response = transport.handle_request(request) File "C:\Users\VYRAL\AppData\Local\hermes\hermes-agent\venv\Lib\site-packages\httpx_transports\default.py", line 250, in handle_request resp = self._pool.handle_request(req) File "C:\Users\VYRAL\AppData\Local\hermes\hermes-agent\venv\Lib\site-packages\httpcore_sync\connection_pool.py", line 236, in handle_request response = connection.handle_request( File "C:\Users\VYRAL\AppData\Local\hermes\hermes-agent\venv\Lib\site-packages\httpcore_sync\connection.py", line 78, in handle_request stream = self._connect(request) File "C:\Users\VYRAL\AppData\Local\hermes\hermes-agent\venv\Lib\site-packages\httpcore_sync\connection.py", line 124, in _connect stream = self._network_backend.connect_tcp(**kwargs) File "C:\Users\VYRAL\AppData\Local\hermes\hermes-agent\venv\Lib\site-packages\httpcore_backends\sync.py", line 208, in connect_tcp sock = socket.create_connection( File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2544.0_x64__qbz5n2kfra8p0\Lib\socket.py", line 849, in create_connection sock.connect(sa)

(╥_╥) error, retrying... WARNING run_agent: API call failed (attempt 1/3) error_type=BadRequestError thread=asyncio_0:3480 provider=lmstudio base_url=http://localhost:1234/v1 model=qwen/qwen3-coder-30b summary=HTTP 400: Error code: 400 ⚠️ API call failed (attempt 1/3): BadRequestError [HTTP 400] 🔌 Provider: lmstudio Model: qwen/qwen3-coder-30b 🌐 Endpoint: http://localhost:1234/v1 📝 Error: HTTP 400: Error code: 400 ⏱️ Elapsed: 5.06s Context: 4 msgs, ~3,829 tokens ⚠️ Non-retryable error (HTTP 400) — trying fallback... 🧾 Request debug dump written to: C:\Users\VYRAL\AppData\Local\hermes\sessions\request_dump_20260510_152712_d29d749c_20260512_150825_344573.json ❌ Non-retryable error (HTTP 400): HTTP 400: Error code: 400 ❌ Non-retryable client error (HTTP 400). Aborting. 🔌 Provider: lmstudio Model: qwen/qwen3-coder-30b 🌐 Endpoint: http://localhost:1234/v1 💡 This type of error won't be fixed by retrying. ERROR root: Non-retryable client error: Error code: 400`

Steps to Reproduce

Configure to use local LM Studio endpoint. Connect to discord. Then initiate a DM chat to hermes.

Hermes APP — 3:11 PM ⚠️ Non-retryable error (HTTP 400) — trying fallback... ❌ Non-retryable error (HTTP 400): HTTP 400: Error code: 400

Expected Behavior

It should successfully talk to LM Studio's endpoint API.

Actual Behavior

❌ Non-retryable error (HTTP 400): HTTP 400: Error code: 400 ❌ Non-retryable client error (HTTP 400). Aborting. 🔌 Provider: lmstudio Model: qwen/qwen3-coder-30b 🌐 Endpoint: http://localhost:1234/v1 💡 This type of error won't be fixed by retrying. ERROR root: Non-retryable client error: Error code: 400

Affected Component

Gateway (Telegram/Discord/Slack/WhatsApp)

Messaging Platform (if gateway-related)

Discord

Debug Report

Report https://dpaste.com/FJZD27H84

Operating System

Windows 11

Python Version

3.13.9

Hermes Version

0.13.0

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

hermes - 💡(How to fix) Fix [Bug]: Cannot connect to LM Studio