Documentation
¶
Index ¶
- type Option
- func WithCompactUpstreamChunkBytes(bytes int) Option
- func WithCompactUpstreamChunkConcurrency(concurrency int) Option
- func WithCompactUpstreamMaxAttempts(max int) Option
- func WithCopilotHeaderConfig(cfg proxy.CopilotHeaderConfig) Option
- func WithProxyOptions(opts ...proxy.Option) Option
- func WithResponsesWebSocketConfig(cfg proxy.ResponsesWebSocketConfig) Option
- func WithStreamingUpstreamTimeout(timeout time.Duration) Option
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*options)
Option customizes server creation.
func WithCompactUpstreamChunkBytes ¶ added in v0.10.3
WithCompactUpstreamChunkBytes overrides the initial body size targeted when chunking /v1/responses/compact retries after an upstream 413.
func WithCompactUpstreamChunkConcurrency ¶ added in v0.11.0
WithCompactUpstreamChunkConcurrency overrides the maximum number of sibling compact chunks sent concurrently after the first chunk succeeds.
func WithCompactUpstreamMaxAttempts ¶ added in v0.10.3
WithCompactUpstreamMaxAttempts caps the total logical compaction calls the /v1/responses/compact 413 fallback may perform per inbound request. Logical calls can produce extra real upstream POSTs through model fallback or the shared transport-retry policy.
func WithCopilotHeaderConfig ¶
func WithCopilotHeaderConfig(cfg proxy.CopilotHeaderConfig) Option
WithCopilotHeaderConfig overrides the synthetic Copilot-identifying headers sent on upstream requests.
func WithProxyOptions ¶
WithProxyOptions forwards proxy-level options to the underlying handler.
func WithResponsesWebSocketConfig ¶
func WithResponsesWebSocketConfig(cfg proxy.ResponsesWebSocketConfig) Option
WithResponsesWebSocketConfig overrides websocket-session handling for GET /v1/responses Codex clients.
func WithStreamingUpstreamTimeout ¶
WithStreamingUpstreamTimeout overrides the timeout used for streaming upstream inference requests and derives the server write timeout from it.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server encapsulates the HTTP server lifecycle.
func New ¶
func New(authenticator *auth.Authenticator, log *logger.Logger, host, port string, opts ...Option) (*Server, error)
New creates a Server with routes and timeouts configured.