This issue has been created
There is 1 update.
 
 
LLM AI Integration / cid:jira-generated-image-avatar-1bf84d00-02e7-43c1-a070-f3c1817f8eb9 LLMAI-137 Open

LMStudio (and h2c-incompatible inference servers) produce silent pending responses due to HTTP/2 upgrade headers

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-7f0a27a2-a8c8-41e1-b23e-87557d0e7fd7 Paul Pantiru created this issue on 14/May/26 10:37
 
Summary: LMStudio (and h2c-incompatible inference servers) produce silent pending responses due to HTTP/2 upgrade headers
Issue Type: cid:jira-generated-image-avatar-1bf84d00-02e7-43c1-a070-f3c1817f8eb9 Bug
Affects Versions: 0.8
Assignee: Unassigned
Created: 14/May/26 10:37
Priority: cid:jira-generated-image-static-major-ba62c18e-e121-4901-bdb1-0b0ac884bfe4 Major
Reporter: Paul Pantiru
Description:

When the AI LLM application connects to certain local inference servers (confirmed: LMStudio), requests hang indefinitely with no response and no error logged. The browser shows the request as "pending" with an empty body.

Root Cause{}

HttpClientFactory creates Java HttpClient instances with HttpClient.Version.HTTP_2. For plain HTTP connections (i.e., local inference servers using http://), Java's HttpClient sends an h2c upgrade request with the headers:

Connection: Upgrade, HTTP2-Settings
Upgrade: h2c
HTTP2-Settings: ...

Servers that correctly implement the RFC (e.g., Ollama) ignore these headers and respond with a normal HTTP/1.1 200, which Java's HttpClient accepts as a graceful fallback. However, LMStudio's HTTP server does not respond at all when it receives these headers, causing the Java HttpClient to block indefinitely. Since the hang occurs inside the StreamingOutput lambda (after the 200 SSE response headers are already sent to the browser), no exception is surfaced to the caller or logged.

  Steps to Reproduce{}

  1. Configure an AI server pointing to a local LMStudio instance (e.g., http://localhost:1234/v1/)

  2. Create a model bound to a LMStudio-loaded model (e.g., google/gemma-3n-e4b)

  3. Send a chat completion request with stream: true

  4. Observe: request stays "pending" indefinitely, no response, no XWiki log output

  Expected Behavior{}

  A response is returned from LMStudio, same as with Ollama or cloud providers.

  Actual Behavior{}

  The request hangs indefinitely. LMStudio never receives the request (confirmed via its activity log). No error is logged on the XWiki side.

 
 

1 update

 
cid:jira-generated-image-avatar-7f0a27a2-a8c8-41e1-b23e-87557d0e7fd7 Changes by Paul Pantiru on 14/May/26 10:37
 
Assignee: Paul Pantiru