Pre-submission Checklist / 提交前检查
FAQ Check / FAQ 检查
Bug Description / Bug 描述
When a client sends a request to AxonHub with Content-Encoding: zstd, AxonHub appears to read the compressed request body as raw JSON instead of decoding it first. This causes the OpenAI Responses API request decoder to fail with a JSON parse error.
The observed failure happens on /v1/responses, but the request body is read through the shared HTTP request parsing path, so other JSON endpoints that receive zstd-compressed request bodies may be affected as well.
Steps to Reproduce / 复现步骤
- Start AxonHub.
- Send an OpenAI Responses API request to
/v1/responses with a valid JSON body compressed using zstd.
- Include the request header
Content-Encoding: zstd.
- Observe that AxonHub rejects the request while decoding the Responses API payload.
Example request shape:
POST /v1/responses HTTP/1.1
Content-Type: application/json
Content-Encoding: zstd
Authorization: Bearer <redacted>
<zstd-compressed JSON body>
Original uncompressed JSON body is valid JSON, for example:
{"model":"<model>","input":"hello"}
Expected Behavior / 期望行为
AxonHub should detect Content-Encoding: zstd, decode the request body before JSON parsing/transformation, and avoid forwarding an already-decoded body with the stale Content-Encoding: zstd header to upstream providers.
If zstd request body compression is intentionally unsupported, AxonHub should return a clear unsupported content encoding error instead of a misleading JSON parse error.
Error Message / 错误消息
{
"error": {
"message": "invalid request: failed to decode responses api request: invalid character '(' looking for beginning of value",
"type": "invalid_request_error"
}
}
Operating System / 操作系统
Windows / Windows
AxonHub Version / AxonHub 版本
unstable branch at commit aab5159a (chore: sync model developers data (#1675))
Usage Scenario / 使用场景
API
API Format / API 格式
OpenAI - Responses (/v1/responses)
Channel Type / 渠道类型
Custom/Other
Logs / 日志
No additional server logs captured. The client-visible error is included above.
Additional Context / 其他补充信息
The behavior suggests the compressed body bytes are passed directly into JSON decoding. A likely area to inspect is the shared HTTP request body reading path before inbound transformers parse JSON bodies.
Pre-submission Checklist / 提交前检查
FAQ Check / FAQ 检查
Bug Description / Bug 描述
When a client sends a request to AxonHub with
Content-Encoding: zstd, AxonHub appears to read the compressed request body as raw JSON instead of decoding it first. This causes the OpenAI Responses API request decoder to fail with a JSON parse error.The observed failure happens on
/v1/responses, but the request body is read through the shared HTTP request parsing path, so other JSON endpoints that receive zstd-compressed request bodies may be affected as well.Steps to Reproduce / 复现步骤
/v1/responseswith a valid JSON body compressed using zstd.Content-Encoding: zstd.Example request shape:
Original uncompressed JSON body is valid JSON, for example:
{"model":"<model>","input":"hello"}Expected Behavior / 期望行为
AxonHub should detect
Content-Encoding: zstd, decode the request body before JSON parsing/transformation, and avoid forwarding an already-decoded body with the staleContent-Encoding: zstdheader to upstream providers.If zstd request body compression is intentionally unsupported, AxonHub should return a clear unsupported content encoding error instead of a misleading JSON parse error.
Error Message / 错误消息
{ "error": { "message": "invalid request: failed to decode responses api request: invalid character '(' looking for beginning of value", "type": "invalid_request_error" } }Operating System / 操作系统
Windows / Windows
AxonHub Version / AxonHub 版本
unstablebranch at commitaab5159a(chore: sync model developers data (#1675))Usage Scenario / 使用场景
API
API Format / API 格式
OpenAI - Responses (
/v1/responses)Channel Type / 渠道类型
Custom/Other
Logs / 日志
No additional server logs captured. The client-visible error is included above.
Additional Context / 其他补充信息
The behavior suggests the compressed body bytes are passed directly into JSON decoding. A likely area to inspect is the shared HTTP request body reading path before inbound transformers parse JSON bodies.