Commit c63259d
committed
feat: Gate 0 - modular route-based server architecture
Refactor monolithic proxyServer.ts (1128 lines) into pluggable handlers:
- NEW src/server/router.ts: Route registry + request handler factory
- NEW src/server/state.ts: Shared request logs + cost tracking
- NEW src/server/metrics.ts: Prometheus-compatible metrics
- NEW src/server/handlers/chatHandler.ts: POST /v1/chat/completions
- NEW src/server/handlers/completionsHandler.ts: POST /v1/completions
- NEW src/server/handlers/embeddingsHandler.ts: POST /v1/embeddings
- NEW src/server/handlers/modelsHandler.ts: GET /v1/models
- NEW src/server/handlers/healthHandler.ts: GET /health
- NEW src/server/handlers/metricsHandler.ts: GET /metrics
- proxyServer.ts: now uses registerRoute() + createRequestHandler()
New endpoint addition = 2 lines (import + registerRoute call).
Also:
- Fix skill_manager.test.ts Python docstring -> TypeScript JSDoc
- Update README with new server architecture + API endpoints
- Bump version to 2.15.0
- npm publish adaptive-memory-multi-model-router@2.15.01 parent 2fb51a7 commit c63259d
117 files changed
Lines changed: 2863 additions & 1020 deletions
File tree
- dist
- analytics
- benchmark
- cache
- cli
- cost
- ensemble
- integrations
- memory
- observability
- providers
- routing
- security
- server
- handlers
- skills/__tests__
- tui
- utils
- src
- server
- handlers
- skills/__tests__
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
112 | 134 | | |
113 | 135 | | |
114 | 136 | | |
| |||
257 | 279 | | |
258 | 280 | | |
259 | 281 | | |
| 282 | + | |
| 283 | + | |
260 | 284 | | |
261 | 285 | | |
262 | | - | |
| 286 | + | |
| 287 | + | |
263 | 288 | | |
264 | 289 | | |
265 | 290 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
| 3 | + | |
| 4 | + | |
11 | 5 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 6 | + | |
| 7 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments