Skip to main content

Crate byokey_proxy

Crate byokey_proxy 

Source
Expand description

HTTP proxy layer — axum router, route handlers, and error mapping.

§Module layout

  • handler — HTTP route handlers (API, Amp, management).
  • router — Axum router construction and route registration.
  • errorApiError type for OpenAI-compatible error responses.
  • openapiOpenAPI specification generation.
  • usage — In-memory request/token usage tracking.

Re-exports§

pub use error::ApiError;
pub use handler::amp::threads::AmpThreadIndex;
pub use openapi::ApiDoc;
pub use router::make_router;
pub use usage::UsageRecorder;
pub use usage::UsageStats;

Modules§

error
API error type that maps ByokError variants to HTTP status codes.
handler
HTTP route handlers for all proxy endpoints.
middleware
Axum middleware layers for the proxy.
openapi
OpenAPI specification aggregation.
router
Axum router construction and route registration.
usage
In-memory usage statistics for request/token tracking, with optional persistent backing via UsageStore.

Structs§

AppState
Shared application state passed to all route handlers.
VersionStore
Shared, read-only store of provider version info loaded at startup.