Skip to content

Commit 373312a

Browse files
JOYclaude
andcommitted
docs: rewrite README for standalone repo - highlight DOS.AI production use
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d00c26a commit 373312a

1 file changed

Lines changed: 33 additions & 5 deletions

File tree

README.md

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
1-
# DOSRouter (Go)
1+
# DOSRouter
22

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
420

521
## Architecture
622

@@ -20,6 +36,9 @@ models/ Model catalog
2036
proxy/ OpenAI-compatible proxy
2137
proxy.go HTTP server with smart routing, SSE streaming, /debug endpoint
2238
39+
session/ Session management
40+
session.go Conversation pinning with TTL and explicit user overrides
41+
2342
cmd/dosrouter/ CLI
2443
main.go serve, classify, models commands
2544
```
@@ -48,7 +67,7 @@ cmd/dosrouter/ CLI
4867

4968
**Confidence**: Sigmoid calibration `1/(1+exp(-12*distance))`, threshold 0.7
5069

51-
## Usage
70+
## Quick Start
5271

5372
### CLI
5473

@@ -64,7 +83,7 @@ go run ./cmd/dosrouter serve --port 8080 --upstream https://api.example.com --ap
6483
go run ./cmd/dosrouter models
6584
```
6685

67-
### As a library
86+
### As a Library
6887

6988
```go
7089
import (
@@ -93,7 +112,6 @@ fmt.Printf("Model: %s, Tier: %s, Savings: %.0f%%\n",
93112
## Build & Test
94113

95114
```bash
96-
cd go/
97115
go build ./...
98116
go test ./router/ -v
99117
go test ./router/ -bench=. -benchmem
@@ -104,3 +122,13 @@ go test ./router/ -bench=. -benchmem
104122
- Classification: ~0.04ms per request (40us)
105123
- Zero external dependencies for routing
106124
- 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.
129+
130+
**Current sync**: v0.12.146
131+
132+
## License
133+
134+
MIT

0 commit comments

Comments
 (0)