Mithril — API — The Beacon Towers




Purpose
🏰
HTTP server exposing Mithril as an Ollama-compatible and OpenAI-compatible endpo
Files
6
LOC
926

Key Concept

External tools (Junie, OpenCode) connect here. They see fellowships as 'models' and talk standard protocols.

Mithril exposes three API protocols simultaneously on the same port:

1. Ollama API (for Junie, OpenCode, Open WebUI)

2. OpenAI API (for LangChain, custom apps)

3. JEV System 1 API (for Fast Zero-Shot Decisions)

4. MCP Protocol (for Claude Desktop)

How Clients Connect

Point any Ollama-compatible client to http://localhost:16180. Fellowships appear as selectable "models". The client doesn't know it's talking to an orchestrated team of models. Direct decision requests can be sent to POST /v1/systemone.

Download as CSV
Endpoint Protocol Purpose
GET /health — Health check + version
GET /api/tags Ollama List models (includes fellowships)
POST /api/chat Ollama Chat with streaming support
POST /api/generate Ollama Text generation
GET /v1/models OpenAI List models
POST /v1/chat/completions OpenAI Chat completion
POST /v1/systemone JEV System 1 zero-shot decision & classification routing
POST /mcp MCP JSON-RPC tool calls (24 tools)

FilePurpose
mcp.rsModel Context Protocol JSON-RPC 2.0 tool execution.
mod.rsAPI routes and state definition.
ollama.rsOllama-compatible API handlers (/api/tags, /api/chat, /api/generate).
openai.rsOpenAI-compatible API handlers (/v1/models, /v1/chat/completions).
server.rsAxum HTTP server setup, middleware, and route mounting.
systemone.rsJEV System 1 zero-shot classification & decision routing handler (/v1/systemone).