Skip to main content

Crate kcode_intelligence_router

Crate kcode_intelligence_router 

Source
Expand description

Typed, in-process intelligence operations for Kennedy.

This crate has no HTTP router, health endpoint, provider catalog, or JSON request dispatch. Callers choose exact models and bind every provider call to a user before invoking it.

Structs§

Accounted
A successful provider result together with its canonical durable receipt.
AgentTurn
AnnotationRequest
AnnotationResponse
AudioAnalysisRequest
One Gemini audio-analysis call with exact model and accounting attribution.
AudioAnalysisResponse
Config
Construction inputs for the intelligence library.
CostEstimate
A non-negative estimated cost represented exactly in billionths of one US dollar.
DailyUsage
Totals calculated by opening every receipt for the requested UTC day.
DailyUsageKey
One grouping key in a linearly calculated daily report.
Document
DocumentExtraction
Error
A bounded, transport-independent intelligence failure.
FetchRequest
FetchResponse
ImageRequest
One direct image creation or reference-image modification request.
ImageResponse
One generated image normalized across providers.
Intelligence
Media
ResolvedAgentModel
Exact provider model and capacity selected for an agent request.
RuntimeModel
The configured Kennedy model, returned directly instead of through a catalog endpoint.
SearchRequest
SearchResponse
StructuredAudioRequest
Compatibility request for callers that always require structured Gemini audio output.
StructuredAudioResponse
TextGenerationRequest
One tool-free Codex text generation call.
TextGenerationResponse
TokenUsage
The four token categories Kennedy accounts independently.
TranscriptionRequest
TranscriptionResponse
UsageReceipt
Durable evidence for one completed provider call.
UserIntelligence
An intelligence handle that cannot make a provider call without user attribution.
WebSource

Enums§

AgentProvider
Provider selected for one resolved agent model.
CostAccuracy
Confidence in a locally calculated provider cost.
ErrorKind
Broad failure category for callers that need to choose retry or user feedback.
MediaKind
Metering
Provider metering returned by one call.
ReasoningEffort
Maximum model reasoning effort.

Constants§

PRICING_VERSION
Published provider prices compiled into this Kennedy build.

Functions§

estimate_cost
Estimates one normalized call using Kennedy’s compiled standard-tier price catalog.
estimate_token_cost
Estimates normalized token usage for a known model.
open

Type Aliases§

Result