Skip to main content

embacle_server/
lib.rs

1// ABOUTME: Library root re-exporting server modules for integration testing
2// ABOUTME: Enables tests/ to access router, state, types, and handler modules
3//
4// SPDX-License-Identifier: Apache-2.0
5// Copyright (c) 2026 dravr.ai
6
7//! # embacle-server
8//!
9//! Unified OpenAI-compatible REST API + MCP server for embacle LLM runners.
10//!
11//! ## Endpoints
12//!
13//! - `POST /v1/chat/completions` — chat completion (streaming and non-streaming)
14//! - `GET /v1/models` — list available providers and models
15//! - `GET /health` — per-provider readiness check
16//! - `POST /mcp` — MCP Streamable HTTP (JSON-RPC 2.0, via embacle-mcp)
17//!
18//! ## Modules
19//!
20//! - [`completions`] — chat completion handler with multiplex fan-out
21//! - [`models`] — model listing endpoint
22//! - [`health`] — provider health checks
23//! - [`auth`] — optional bearer token authentication
24//! - [`streaming`] — SSE streaming for OpenAI-format responses
25//! - [`provider_resolver`] — `provider:model` string routing
26//! - [`router`] — Axum router wiring all endpoints (`OpenAI` + MCP)
27//! - [`state`] — re-export of unified state from embacle-mcp
28//! - [`runner`] — runner factory bridging to embacle core
29
30pub mod auth;
31pub mod completions;
32pub mod health;
33pub mod models;
34pub mod openai_types;
35pub mod provider_resolver;
36pub mod router;
37pub mod runner;
38pub mod state;
39pub mod streaming;