Skip to content

feat: normalize content coding boundaries - #433

Closed
tbphp wants to merge 1 commit into
v2from
agent/content-coding-boundary
Closed

feat: normalize content coding boundaries#433
tbphp wants to merge 1 commit into
v2from
agent/content-coding-boundary

Conversation

@tbphp

@tbphp tbphp commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Summary

Implements the confirmed GPT-Load 2.0 content-coding boundary:

  • accepts single-layer gzip, br, deflate, and zstd request bodies on data-plane endpoints
  • bounds both encoded and decoded request sizes at 32 MiB
  • normalizes requests to plaintext before dialect inspection and forwarding
  • reserves Accept-Encoding, Content-Encoding, and Content-Length from persisted Header Rule set values; reserved removals are ignored at runtime
  • forces valid data-plane upstream requests to carry Accept-Encoding: identity
  • keeps the existing Forwarder response inspection and safety behavior, while terminating non-streaming compression at the downstream write boundary
  • keeps successful SSE identity-only and returns all client-visible data-plane responses as plaintext
  • adds stable 400/406/413/415 local error semantics

Scope

  • data plane only: OpenAI Completions, OpenAI Responses, Anthropic, Gemini, and local model-list responses
  • no database schema or frontend changes
  • no stacked encodings and no compressed SSE decoder

Design source

  • Notion: GPT-Load 2.0 内容编码与压缩设计方案
  • Notion: GPT-Load 2.0 内容编码与压缩实施方案

Verification

CI is expected to run the repository's existing Go formatting, vet, race, dependency, and Windows checks. The PR remains draft until those checks are green and the diff has been reviewed.

@tbphp tbphp closed this Aug 3, 2026
@tbphp
tbphp deleted the agent/content-coding-boundary branch August 3, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant