You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33-5Lines changed: 33 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,22 @@
1
-
# DOSRouter (Go)
1
+
# DOSRouter
2
2
3
-
Smart LLM router ported from [ClawRouter](https://github.com/BlockRunAI/ClawRouter) (TypeScript) to Go.
3
+
**High-performance LLM router written in Go.** Routes requests to the optimal model based on prompt complexity, cost targets, and capability requirements.
4
+
5
+
Go port of [ClawRouter](https://github.com/BlockRunAI/ClawRouter) (TypeScript) - rewritten for lower latency and easier deployment.
6
+
7
+
> **Production-proven at [DOS.AI](https://dos.ai)** - powering the DOS.AI inference API that serves thousands of LLM requests daily with automatic model selection, cost optimization, and multi-provider failover.
8
+
9
+
## Features
10
+
11
+
-**15-dimension weighted scorer** - classifies prompts in ~0.04ms (40us) without any LLM call
12
+
-**Tier-based routing** - SIMPLE / MEDIUM / COMPLEX / REASONING with configurable model pools
13
+
-**Cost optimization** - automatic savings calculation vs baseline (opus-class) pricing
14
+
-**Multi-provider failover** - primary + fallback providers per model
15
+
-**Agentic detection** - identifies tool-calling patterns, routes to capable models
16
+
-**Session pinning** - maintains model consistency within conversations
17
+
-**Streaming proxy** - OpenAI-compatible SSE proxy with cost breakdown injection
18
+
-**55+ models** - built-in catalog with pricing, capabilities, and aliases
19
+
-**Zero dependencies** for core routing - only stdlib
4
20
5
21
## Architecture
6
22
@@ -20,6 +36,9 @@ models/ Model catalog
20
36
proxy/ OpenAI-compatible proxy
21
37
proxy.go HTTP server with smart routing, SSE streaming, /debug endpoint
22
38
39
+
session/ Session management
40
+
session.go Conversation pinning with TTL and explicit user overrides
@@ -104,3 +122,13 @@ go test ./router/ -bench=. -benchmem
104
122
- Classification: ~0.04ms per request (40us)
105
123
- Zero external dependencies for routing
106
124
- LLM fallback only for ambiguous cases (~20-30%)
125
+
126
+
## Upstream Sync
127
+
128
+
This is a Go port of [BlockRunAI/ClawRouter](https://github.com/BlockRunAI/ClawRouter). Routing logic is synced periodically from upstream releases. Payment, plugin lifecycle, and CLI-specific features are excluded. See [UPSTREAM_SYNC.md](UPSTREAM_SYNC.md) for details.
0 commit comments