Initial commit: llm-router — smart OpenAI/Anthropic/Ollama router

A stdlib pre-router in front of Ollama with LiteLLM backend:
- auto model selection by content/tools/modality, with fallbacks
- OpenAI /v1, Anthropic /v1/messages, and Ollama-native /api/* endpoints
- Whisper-shaped /v1/audio/transcriptions + in-chat audio
- key-based fleet policies (e.g. force a client onto uncensored models)
- optional Bearer auth; launchd/systemd service install
- benchmark harnesses (speed, quality, agentic tool use) with sample results

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Joseph Costa
2026-07-05 02:05:16 -05:00
co-authored by Claude Opus 4.8
commit 9938d46a67
32 changed files with 2419 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
Copy this file to `.apikey` and put a single secret token in it (no newline needed).
When `.apikey` exists, run.sh sets ROUTER_API_KEY and the router requires
`Authorization: Bearer <token>` on all /v1 requests.
If `.apikey` does NOT exist, the router runs OPEN (no auth) — fine on a trusted
LAN, NOT fine if you expose it to the internet.
Generate one: openssl rand -hex 24