Skip to main content

Module server

Module server 

Source
Expand description

Hyprstream server implementation with OpenAI-compatible API

This module provides the main HTTP server with:

  • OpenAI-compatible API endpoints at /oai/v1
  • Model management at /models

Re-exports§

pub use middleware::AuthenticatedUser;

Modules§

middleware
Middleware for authentication, logging, and request processing
routes
HTTP route handlers
state
Server state management
tls
Shared TLS materials and HTTPS serving helpers for HTTP services.

Functions§

create_app
Create the main application router
extract_policy_identity
Extract the subject and its authority-verified hosted-account policy domain.
extract_user
Extract user identity from optional authenticated user extension. Returns “anonymous” if no authentication present.
start_server
Start the HTTP server (plain, no TLS).
start_server_tls
Start the HTTPS server with TLS.