| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| BFE v1.8.9.1 source code.tar.gz | 2026-10-27 | 8.6 MB | |
| BFE v1.8.9.1 source code.zip | 2026-10-27 | 13.3 MB | |
| README.md | 2026-10-27 | 3.0 kB | |
| Totals: 3 Items | 21.9 MB | 0 | |
Added
- Add
Server.AIUpstreamAcceptEncoding(auto/identity/off, defaultauto): howAccept-Encodingis rewritten on an AI upstream request, so content negotiation stays inside the coding set the gateway can decode (gzip,deflate).autokeeps only the decodable codings of the client's list (q values preserved, an empty intersection is left untouched,identity;q=0is honoured),identitystrips compression for diagnostics,offkeeps the previous behaviour. The rewrite only touches the outbound header: the inbound request, the access log,mod_ai_cacheandmod_compressstill see the client value (issue [#1468]) - Add
bfe_util.NewContentDecoder/CanDecodeContentEncoding/SupportedContentEncodings, a streamingContent-Encodingdecoder coveringgzip/x-gzipanddeflate(zlib header sniffed, raw DEFLATE accepted).DecodeContentEncodingnow delegates to it, so the non-streaming parse-only copy also understandsdeflate(issue [#1468]) - Add the
ResStreamCompressed/ResStreamDecoded/ResStreamDecodeSkipped/ResStreamRawOnlymod_body_processcounters: how many responses carried aContent-Encoding, how many got the decompress-for-parsing tap, how many could not be decoded and how many degraded mid-stream. The last two mean "this request is billed by estimation", i.e. the only signal that an upstream ignored the narrowedAccept-Encoding(issue [#1468])
Changed
- An AI upstream request whose client
Accept-Encodingcontains codings the gateway cannot decode no longer receives them (Server.AIUpstreamAcceptEncoding = auto, the default): the upstream is offeredgzip/deflateonly, so a client that asked forzstdmay now receivegzipinstead (still inside its ownAccept-Encoding, <1% size difference). SetServer.AIUpstreamAcceptEncoding = offto keep the previous negotiation (issue [#1468])
Fixed
- Parse the usage of a compressed streaming (SSE) response instead of estimating it:
mod_body_processbypassed anyContent-Encodingbody to a byte-wise pass-through, socache_read_tokensstayed 0,prompt_tokensfell back to the request-body estimate andcompletion_tokensto the compressed-bytes estimate, and the whole prompt was billed at the input price — measured on the field at a 96% cache-hit rate that overcharges by roughly 46x and writesai_usage_source=estimated. Compressed SSE now goes throughCompressedStreamDecoder, which tees the source into a decompressor used only for parsing while the original compressed bytes are forwarded verbatim together with theContent-Encodingheader; a decompression failure or an unsupported coding degrades to a byte-exact pass-through plus the estimate, visibly (issue [#1468]) - Report a skipped
stream_options.include_usageinjection when the request body exceedsServer.AccessibleBodySize: the injection used to fail silently, which raised the probability of an upstream returning no usage at all (issue [#1468])