Skip to content

The agent that grows with you

fix(kimi): exclude brotli from Accept-Encoding to work around httpx/brotlicffi streaming decode bug (#59556)

David Metcalfe9a8748796dfb
diff --git a/plugins/model-providers/kimi-coding/__init__.py b/plugins/model-providers/kimi-coding/__init__.py
index 85d93de2867..3bf88f080cd 100644
--- a/plugins/model-providers/kimi-coding/__init__.py
+++ b/plugins/model-providers/kimi-coding/__init__.py
@@ -13,6 +13,10 @@ _HEADERS = {
"HTTP-Referer": "https://hermes-agent.nousresearch.com",
"X-Title": "Hermes Agent",
"User-Agent": f"HermesAgent/{_HERMES_VERSION}",
+ # Exclude brotli: httpx's brotlicffi backend has a streaming decode bug on
+ # Moonshot's content-encoding: br SSE responses (#28043, #48428, #59556).
+ # gzip sidesteps it while still compressing the transfer.
+ "Accept-Encoding": "gzip",
}