Skip to main content

Crate router_protocol

Crate router_protocol 

Source
Expand description

Canonical, provider-neutral M1 protocol and replay state.

Structs§

AttemptId
CallId
CanonicalRequest
CapabilityRequirements
CatalogCapabilityClassification
CatalogDiscoveredModelReceipt
CatalogDiscoveryApplyRequest
CatalogDiscoveryPlanEntry
CatalogDiscoveryPreview
CatalogDiscoveryPreviewRequest
CatalogDiscoveryReceipt
CatalogModelQualificationReceipt
CatalogPhaseDiscoveryReceipt
CatalogProofArtifact
CatalogProofArtifactManifest
CatalogQualificationApplyRequest
CatalogQualificationArtifact
CatalogQualificationPreview
CatalogQualificationPreviewRequest
CatalogQualificationReceipt
CatalogQualificationTarget
EndpointIdentity
FunctionTool
HarnessInstanceId
ItemId
MultiAgentCapabilityProjection
Per-route MAv2 capability projection (PRD-001u R1.1): whether the route represents namespace tools, the multi-agent protocol version it serves, the wire API, and the observed namespace-call behavior.
PhaseId
Stable operator-defined phase identity. PhaseKind remains the executable adapter kind; ordering and fallback use this independent string identity.
ProviderCapabilities
PublicError
ReplayAuthorization
ReplayGuard
RequestId
ResponseId
RouteIdentity
SessionId
StructuredOutputIntent
TurnId
Usage

Enums§

BillingAuthorityClass
CanonicalEvent
CatalogDiscoveryOutcome
CatalogProofRole
CatalogQualificationArtifactKind
CatalogQualificationStatus
CatalogSourceKind
ContentBlock
CredentialSourceKind
EventVisibility
ExecutionLocation
InputItem
InterruptionCause
MessageRole
ModelNamespace
MultiAgentCapability
How a phase can serve Codex harness subagent (multi-agent) calls.
MultiAgentNamespace
Chosen MAv2 namespace for a route (PRD-001u R4.1). Collaboration is the model-reserved namespace for GPT-5.6 Sol/Terra/Luna and requires the exact canonical schema; Agents is the documented non-reserved namespace that bypasses the reserved-schema 400 for generated schemas.
MultiAgentVersion
Multi-agent protocol version a route can serve. V2 is the Codex MAv2 namespace protocol (collaboration/agents); V1 is the earlier multi_agent_v1 namespace protocol; Disabled means the route cannot serve any namespace protocol.
MultiAgentWireApi
Wire API used for multi-agent calls. Only the Responses API is supported in this generation; the chat wire API was removed in the Codex CLI generation that introduced namespace tools.
ObservedNamespaceCallBehavior
Observed namespace-call behavior of the backend, recorded per route so the wire normalizer and operators can see how each phase emits namespace tool calls (PRD-001u R1.1).
OutputItemKind
PhaseKind
PhasePlacement
ProviderService
PublicErrorCode
ReasoningIntent
RouteIdentityError
SafeResumeBoundary
SubagentDisposition
How a subagent-bearing request is served, recorded before any visible output or harness-visible tool effect (PRD-001l R6 — no silent degradation). Every subagent request ends in exactly one of these states.
ToolChoice
TransportKind
ValidationError
VisibilityState

Constants§

ANTHROPIC_API_KEY_HEADER
The header name carrying the Anthropic API key.
ANTHROPIC_CHAT_PATH
ANTHROPIC_ORIGIN
ANTHROPIC_VERSION
The Anthropic API version pinned at build time from the published docs.
ANTHROPIC_VERSION_HEADER
The header name carrying the required Anthropic API version.
CATALOG_PROOF_SCHEMA_VERSION
DASHSCOPE_CHAT_PATH
DASHSCOPE_ORIGIN
DASHSCOPE_TOKEN_PLAN_ORIGIN
The operator’s Alibaba Cloud Model Studio token-plan (budget) endpoint. A token-plan API key authenticates only against this host, never against the standard dashscope-intl origin, so a live Qwen route bound to a token-plan credential must resolve here.
DEEPSEEK_CHAT_PATH
DEEPSEEK_ORIGIN
GEMINI_API_KEY_HEADER
The header name carrying the Gemini API key.
GEMINI_GENERATE_CONTENT_PATH
The route endpoint path template. The Gemini adapter replaces the {model} token with the route model id to form the wire path.
GEMINI_ORIGIN
LIVE_CATALOG_DISCOVERY_CONFIRMATION
LIVE_MODEL_QUALIFICATION_CONFIRMATION
M1_WIRE_VERSION
MAX_CATALOG_PROOF_MODELS
MAX_CATALOG_PROOF_PHASES
MAX_CATALOG_QUALIFICATION_TARGETS
MAX_SPEND_AUTHORIZATION_MICRO_USD
Protocol-level sanity bound for a per-request spend authorization (10 USD in micro-USD). The phase owner’s configured request ceiling is the effective binding bound; this only prevents absurd declared values.
MAX_TOOL_COMPONENT_BYTES
MOONSHOT_CHAT_PATH
MOONSHOT_ORIGIN
OLLAMA_CHAT_PATH
OLLAMA_CLOUD_ORIGIN
OLLAMA_GLM_5_2_MODEL
OLLAMA_RELAY_ORIGIN
OPENROUTER_CHAT_PATH
OPENROUTER_ORIGIN
XAI_CHAT_PATH
XAI_ORIGIN
ZAI_CHAT_PATH
ZAI_ORIGIN

Functions§

ollama_cloud_provider_neutral_model
Returns the provider-neutral model represented by an exact transport wire ID.
ollama_cloud_wire_model
Derives the transport-specific Ollama Cloud wire model from a provider-neutral model.
validate_tool_name
validate_tool_namespace