Skip to main content

build

Function build 

Source
pub fn build(state: SharedState) -> Router
Expand description

Build the application router with all endpoints

Routes:

  • POST /v1/chat/completions — Chat completion (streaming and non-streaming)
  • GET /v1/models — List available models
  • GET /health — Provider health check
  • POST /mcp — MCP Streamable HTTP (JSON-RPC 2.0, via dravr-tronc)

The auth middleware is applied to all routes. It only enforces authentication when EMBACLE_API_KEY is set.