Skip to main content

Module types

Module types 

Source
Expand description

Shared public data types for plugin boundaries.

Structs§

CacheBreakpoint
Cache breakpoint position in the request, for prompt cache optimization.
CacheScore
Cache utility prediction for routing decisions.
InternalError
Internal error information with stage and kind details.
PluginManifest
Plugin manifest passed to runtime adapters when instantiating plugins.
Principal
Authenticated caller identity used for quota, audit, and routing decisions.
PrincipalQuotas
Per-principal quota window and model allow-list.
RateLimitObservation
Latest upstream rate-limit observation exposed to router plugins.
RequestContext
Parsed downstream request data passed into plugins.
RouteDecision
Router output selecting both an upstream and its dialect boundary object.
RoutingTrace
Complete routing trace for a request through all decision stages.
ShapedRequest
Request produced by an upstream dialect before credentials are applied.
ShapedRequestBuilder
Dialect-facing capability used to construct shaped requests.
SignedRequest
Request after a signer has consumed and sealed a shaped request.
SigningCapability
Signer-facing capability used to seal shaped requests.
StageDecision
Decision made at a single routing stage.
SubscriptionQuotaCandidateSnapshot
Latest subscription quota snapshot for one candidate/window.
TerminalDecision
Terminal routing decision selecting an upstream.
UpstreamCandidate
Available upstream candidate for routing decisions.
WarmCacheEntry
Warm cache entry eligible for reuse in upstream requests.

Enums§

BreakpointOrigin
Origin of a cache breakpoint: whether explicitly requested or auto-inferred.
CacheBreakpointSource
Source of a cache breakpoint within the request.
CredentialStrategy
Credential strategy expected by a selected upstream.
InternalErrorKind
Kind of internal error that occurred.
InternalErrorStage
Stage where an internal error occurred.
ObserveEvent
Observability events emitted by the lifecycle.
PassthroughCause
Reason for a passthrough routing decision.
PerCandidateReason
Per-candidate evaluation reason.
PrincipalKind
Principal categories supported by first-party and custom auth plugins.
RateLimitKind
Upstream rate-limit metric kind observed from upstream responses.
RetryDecision
Decision returned by a signer after receiving an unauthorized upstream error.
SubscriptionQuotaDataState
Freshness state for subscription quota data exposed to router plugins.
TerminalStrategy
Strategy for selecting a terminal upstream.
TtlClass
Prompt cache TTL class: immutable after entry creation.
Upstream
Upstream backends supported by the proxy routing contract.
UpstreamKind
Upstream record kind exposed to router plugins for candidate selection.

Constants§

MAX_ERROR_MESSAGE_LEN
Maximum length of an error message in internal errors.
MAX_ROUTING_TRACE_STAGES
Maximum number of stages in a routing trace.
MAX_STAGE_NAME_LEN
Maximum length of a stage name.

Functions§

shape_request
Invokes an upstream dialect with a temporary shaped-request capability.
sign_request
Invokes a signer with a temporary signing capability.