Expand description
Proxy context data structures.
The per-request ProxyContext composes several single-responsibility
sub-structs so each cluster of related fields can be reasoned about (and
initialised) independently:
RouteInfo— backend selection + path rewriting (populated inrequest_filter).ConversionFlags— boolean state machine that drives whether and how bodies are converted.ConversionBuffers— buffered request/response bodies + stream parse cursor.UpstreamDiagnostics— observed upstream status / content-type / chunk count, kept for logging and bypass decisions.FollowUpContext— conversation messages we’ll persist after the upstream completes (forprevious_response_idexpansion).
The root keeps only fields that don’t fit any cluster: start_time,
model, and the streaming StreamState.
Structs§
- Conversion
Buffers - Buffered request/response bodies and the stream-parse cursor.
- Conversion
Flags - Boolean state machine that records what kind of conversion is in flight.
- Follow
UpContext - Information needed to persist a completed turn for subsequent
previous_response_idlookups. - Proxy
Context - Proxy context attached to each request session.
- Route
Info - Backend selection and request-path information.
- Upstream
Diagnostics - Upstream observations for diagnostics + bypass decisions.