model-router-cli 1.0.0__tar.gz → 1.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/PKG-INFO +43 -8
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/README.md +41 -7
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/cli/main.py +21 -4
- model_router_cli-1.0.2/backend/app/server.py +111 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/model_router_cli.egg-info/PKG-INFO +43 -8
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/model_router_cli.egg-info/SOURCES.txt +1 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/pyproject.toml +4 -1
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/LICENSE +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/analytics/service.py +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/analyzer/analyzer.py +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/analyzer/heuristics.py +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/api/routes.py +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/budgets/manager.py +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/config/settings.py +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/experiments/service.py +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/fallback/handler.py +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/models/schemas.py +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/observability/events.py +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/providers/base.py +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/providers/external_providers.py +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/providers/mock_provider.py +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/providers/ollama_provider.py +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/providers/registry.py +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/router/engine.py +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/router/rules_engine.py +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/router/scoring.py +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/static/assets/index-CQFztymk.js +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/static/assets/index-DWa3sE4Y.css +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/static/favicon.png +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/static/favicon.svg +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/static/icons.svg +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/static/index.html +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/static/logo.png +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/storage/database.py +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/storage/models.py +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/model_router_cli.egg-info/dependency_links.txt +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/model_router_cli.egg-info/entry_points.txt +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/model_router_cli.egg-info/requires.txt +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/model_router_cli.egg-info/top_level.txt +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/tests/test_analyzer.py +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/tests/test_e2e.py +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/tests/test_providers.py +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/tests/test_router.py +0 -0
- {model_router_cli-1.0.0 → model_router_cli-1.0.2}/setup.cfg +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: model-router-cli
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: Intelligent, explainable LLM request routing platform & AI Traffic Control Room
|
|
5
5
|
Author-email: PicadoLabs <picadolabs@gmail.com>
|
|
6
|
+
Maintainer-email: Kaap10 <picadolabs@gmail.com>
|
|
6
7
|
License: MIT
|
|
7
8
|
Project-URL: Homepage, https://picadolabs.me
|
|
8
9
|
Project-URL: Repository, https://github.com/PicadoLabs/ai-model-router
|
|
@@ -37,6 +38,10 @@ Dynamic: license-file
|
|
|
37
38
|
|
|
38
39
|
# Model Router
|
|
39
40
|
|
|
41
|
+
[](https://pypi.org/project/model-router-cli/)
|
|
42
|
+
[](https://pypi.org/project/model-router-cli/)
|
|
43
|
+
[](https://opensource.org/licenses/MIT)
|
|
44
|
+
|
|
40
45
|
Intelligent, explainable, cost- and latency-aware LLM request routing platform and AI Traffic Control Room.
|
|
41
46
|
|
|
42
47
|
---
|
|
@@ -103,9 +108,32 @@ The platform is designed local-first, allowing full local development and testin
|
|
|
103
108
|
- Node.js 18+ and npm
|
|
104
109
|
- (Optional) [Ollama](https://ollama.com/) for local model inference
|
|
105
110
|
|
|
111
|
+
## 📦 Quick Installation (via PyPI)
|
|
112
|
+
|
|
113
|
+
Install Model Router and its embedded **AI Traffic Control Room** dashboard directly from PyPI:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
pip install model-router-cli
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Quick Commands:
|
|
120
|
+
```bash
|
|
121
|
+
# Run system diagnostics & environment checks
|
|
122
|
+
modelrouter doctor
|
|
123
|
+
|
|
124
|
+
# Launch the Traffic Control Room Dashboard & API Gateway in your browser
|
|
125
|
+
modelrouter ui --open-browser
|
|
126
|
+
|
|
127
|
+
# Route a prompt and inspect the explainability decision (Dry Run)
|
|
128
|
+
modelrouter route "Write an optimized async task worker in Python"
|
|
129
|
+
|
|
130
|
+
# Route and execute inference through the optimal provider
|
|
131
|
+
modelrouter run "Explain the difference between zero-shot and few-shot prompting"
|
|
132
|
+
```
|
|
133
|
+
|
|
106
134
|
---
|
|
107
135
|
|
|
108
|
-
## Installation & Setup
|
|
136
|
+
## Installation & Setup (from Source)
|
|
109
137
|
|
|
110
138
|
### 1. Clone the Repository
|
|
111
139
|
```bash
|
|
@@ -189,23 +217,29 @@ npm run dev
|
|
|
189
217
|
|
|
190
218
|
## CLI Usage
|
|
191
219
|
|
|
192
|
-
The built-in Typer CLI provides terminal commands for inspection, diagnostics, and testing:
|
|
220
|
+
The built-in Typer CLI provides terminal commands for inspection, diagnostics, and testing (use `modelrouter` if installed via pip, or `python backend/app/cli/main.py` from source):
|
|
193
221
|
|
|
194
222
|
```bash
|
|
223
|
+
# Launch the AI Traffic Control Room Web UI and API Gateway
|
|
224
|
+
modelrouter ui --open-browser
|
|
225
|
+
|
|
195
226
|
# Run system diagnostics & provider health checks
|
|
196
|
-
|
|
227
|
+
modelrouter doctor
|
|
197
228
|
|
|
198
229
|
# Inspect routing decision for a prompt without executing (Dry Run)
|
|
199
|
-
|
|
230
|
+
modelrouter route "Write a Python function to parse JSON"
|
|
200
231
|
|
|
201
232
|
# Route and execute a query through the selected model
|
|
202
|
-
|
|
233
|
+
modelrouter run "Debug this distributed async deadlock in worker pool"
|
|
203
234
|
|
|
204
235
|
# List all registered models in the catalog
|
|
205
|
-
|
|
236
|
+
modelrouter models
|
|
237
|
+
|
|
238
|
+
# View recent routed traffic logs
|
|
239
|
+
modelrouter traffic
|
|
206
240
|
|
|
207
241
|
# View system-wide routing performance and cost savings analytics
|
|
208
|
-
|
|
242
|
+
modelrouter analytics
|
|
209
243
|
```
|
|
210
244
|
|
|
211
245
|
---
|
|
@@ -338,6 +372,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
|
|
|
338
372
|
|
|
339
373
|
Maintained and architected by **PicadoLabs**.
|
|
340
374
|
|
|
375
|
+
- **Maintainer**: [@Kaap10](https://github.com/Kaap10)
|
|
341
376
|
- **Organization**: [PicadoLabs](https://github.com/PicadoLabs)
|
|
342
377
|
- **Website**: [https://picadolabs.me](https://picadolabs.me)
|
|
343
378
|
- **Contact**: [picadolabs@gmail.com](mailto:picadolabs@gmail.com)
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Model Router
|
|
2
2
|
|
|
3
|
+
[](https://pypi.org/project/model-router-cli/)
|
|
4
|
+
[](https://pypi.org/project/model-router-cli/)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
|
|
3
7
|
Intelligent, explainable, cost- and latency-aware LLM request routing platform and AI Traffic Control Room.
|
|
4
8
|
|
|
5
9
|
---
|
|
@@ -66,9 +70,32 @@ The platform is designed local-first, allowing full local development and testin
|
|
|
66
70
|
- Node.js 18+ and npm
|
|
67
71
|
- (Optional) [Ollama](https://ollama.com/) for local model inference
|
|
68
72
|
|
|
73
|
+
## 📦 Quick Installation (via PyPI)
|
|
74
|
+
|
|
75
|
+
Install Model Router and its embedded **AI Traffic Control Room** dashboard directly from PyPI:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
pip install model-router-cli
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Quick Commands:
|
|
82
|
+
```bash
|
|
83
|
+
# Run system diagnostics & environment checks
|
|
84
|
+
modelrouter doctor
|
|
85
|
+
|
|
86
|
+
# Launch the Traffic Control Room Dashboard & API Gateway in your browser
|
|
87
|
+
modelrouter ui --open-browser
|
|
88
|
+
|
|
89
|
+
# Route a prompt and inspect the explainability decision (Dry Run)
|
|
90
|
+
modelrouter route "Write an optimized async task worker in Python"
|
|
91
|
+
|
|
92
|
+
# Route and execute inference through the optimal provider
|
|
93
|
+
modelrouter run "Explain the difference between zero-shot and few-shot prompting"
|
|
94
|
+
```
|
|
95
|
+
|
|
69
96
|
---
|
|
70
97
|
|
|
71
|
-
## Installation & Setup
|
|
98
|
+
## Installation & Setup (from Source)
|
|
72
99
|
|
|
73
100
|
### 1. Clone the Repository
|
|
74
101
|
```bash
|
|
@@ -152,23 +179,29 @@ npm run dev
|
|
|
152
179
|
|
|
153
180
|
## CLI Usage
|
|
154
181
|
|
|
155
|
-
The built-in Typer CLI provides terminal commands for inspection, diagnostics, and testing:
|
|
182
|
+
The built-in Typer CLI provides terminal commands for inspection, diagnostics, and testing (use `modelrouter` if installed via pip, or `python backend/app/cli/main.py` from source):
|
|
156
183
|
|
|
157
184
|
```bash
|
|
185
|
+
# Launch the AI Traffic Control Room Web UI and API Gateway
|
|
186
|
+
modelrouter ui --open-browser
|
|
187
|
+
|
|
158
188
|
# Run system diagnostics & provider health checks
|
|
159
|
-
|
|
189
|
+
modelrouter doctor
|
|
160
190
|
|
|
161
191
|
# Inspect routing decision for a prompt without executing (Dry Run)
|
|
162
|
-
|
|
192
|
+
modelrouter route "Write a Python function to parse JSON"
|
|
163
193
|
|
|
164
194
|
# Route and execute a query through the selected model
|
|
165
|
-
|
|
195
|
+
modelrouter run "Debug this distributed async deadlock in worker pool"
|
|
166
196
|
|
|
167
197
|
# List all registered models in the catalog
|
|
168
|
-
|
|
198
|
+
modelrouter models
|
|
199
|
+
|
|
200
|
+
# View recent routed traffic logs
|
|
201
|
+
modelrouter traffic
|
|
169
202
|
|
|
170
203
|
# View system-wide routing performance and cost savings analytics
|
|
171
|
-
|
|
204
|
+
modelrouter analytics
|
|
172
205
|
```
|
|
173
206
|
|
|
174
207
|
---
|
|
@@ -301,6 +334,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
|
|
|
301
334
|
|
|
302
335
|
Maintained and architected by **PicadoLabs**.
|
|
303
336
|
|
|
337
|
+
- **Maintainer**: [@Kaap10](https://github.com/Kaap10)
|
|
304
338
|
- **Organization**: [PicadoLabs](https://github.com/PicadoLabs)
|
|
305
339
|
- **Website**: [https://picadolabs.me](https://picadolabs.me)
|
|
306
340
|
- **Contact**: [picadolabs@gmail.com](mailto:picadolabs@gmail.com)
|
|
@@ -269,17 +269,34 @@ def analytics():
|
|
|
269
269
|
def ui(
|
|
270
270
|
host: str = typer.Option("127.0.0.1", "--host", "-h", help="Host address to bind the web server"),
|
|
271
271
|
port: int = typer.Option(8000, "--port", "-p", help="Port to run the Model Router Control Room on"),
|
|
272
|
+
open_browser: bool = typer.Option(False, "--open-browser", help="Automatically open dashboard in default web browser"),
|
|
272
273
|
):
|
|
273
274
|
"""Launch the Model Router API Gateway & AI Traffic Control Room UI."""
|
|
274
275
|
import uvicorn
|
|
275
|
-
|
|
276
|
+
import webbrowser
|
|
277
|
+
import threading
|
|
278
|
+
import time
|
|
279
|
+
|
|
280
|
+
url = f"http://{host}:{port}"
|
|
281
|
+
message = (
|
|
276
282
|
f"[bold cyan]Starting Model Router AI Traffic Control Room[/bold cyan]\n"
|
|
277
|
-
f"Web Dashboard: [bold green]
|
|
278
|
-
f"API Documentation: [bold green]
|
|
283
|
+
f"Web Dashboard: [bold green]{url}[/bold green]\n"
|
|
284
|
+
f"API Documentation: [bold green]{url}/docs[/bold green]"
|
|
285
|
+
)
|
|
286
|
+
console.print(Panel.fit(
|
|
287
|
+
message,
|
|
279
288
|
title="MODEL ROUTER UI LAUNCHER",
|
|
280
289
|
border_style="cyan"
|
|
281
290
|
))
|
|
282
|
-
|
|
291
|
+
|
|
292
|
+
if open_browser:
|
|
293
|
+
def _open():
|
|
294
|
+
time.sleep(1.2)
|
|
295
|
+
webbrowser.open(url)
|
|
296
|
+
threading.Thread(target=_open, daemon=True).start()
|
|
297
|
+
|
|
298
|
+
from app.server import app as fastapi_app
|
|
299
|
+
uvicorn.run(fastapi_app, host=host, port=port, log_level="info")
|
|
283
300
|
|
|
284
301
|
|
|
285
302
|
if __name__ == "__main__":
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
import json
|
|
3
|
+
import os
|
|
4
|
+
from contextlib import asynccontextmanager
|
|
5
|
+
from fastapi import FastAPI, HTTPException
|
|
6
|
+
from fastapi.middleware.cors import CORSMiddleware
|
|
7
|
+
from fastapi.staticfiles import StaticFiles
|
|
8
|
+
from fastapi.responses import FileResponse
|
|
9
|
+
from sse_starlette.sse import EventSourceResponse
|
|
10
|
+
from sqlalchemy import select, desc
|
|
11
|
+
|
|
12
|
+
from app.config.settings import get_settings
|
|
13
|
+
from app.storage.database import init_db, AsyncSessionLocal
|
|
14
|
+
from app.storage.models import RequestRecord
|
|
15
|
+
from app.api.routes import router as api_router
|
|
16
|
+
|
|
17
|
+
settings = get_settings()
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@asynccontextmanager
|
|
21
|
+
async def lifespan(app: FastAPI):
|
|
22
|
+
# Initialize SQLite database and seed defaults
|
|
23
|
+
await init_db()
|
|
24
|
+
yield
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
app = FastAPI(
|
|
28
|
+
title="Model Router",
|
|
29
|
+
description="Intelligent LLM Request Routing Platform — AI Traffic Control Room",
|
|
30
|
+
version="1.0.0",
|
|
31
|
+
lifespan=lifespan,
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
# CORS configuration
|
|
35
|
+
app.add_middleware(
|
|
36
|
+
CORSMiddleware,
|
|
37
|
+
allow_origins=["*"],
|
|
38
|
+
allow_credentials=True,
|
|
39
|
+
allow_methods=["*"],
|
|
40
|
+
allow_headers=["*"],
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
app.include_router(api_router)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
@app.get("/api/traffic/stream")
|
|
47
|
+
async def stream_live_traffic():
|
|
48
|
+
"""
|
|
49
|
+
SSE Live Stream endpoint for the Traffic Control Room visualization.
|
|
50
|
+
Pushes newly persisted requests to connected frontend clients.
|
|
51
|
+
"""
|
|
52
|
+
async def event_generator():
|
|
53
|
+
last_seen_id = None
|
|
54
|
+
while True:
|
|
55
|
+
try:
|
|
56
|
+
async with AsyncSessionLocal() as session:
|
|
57
|
+
res = await session.execute(
|
|
58
|
+
select(RequestRecord).order_by(desc(RequestRecord.timestamp)).limit(1)
|
|
59
|
+
)
|
|
60
|
+
latest = res.scalar_one_or_none()
|
|
61
|
+
if latest and latest.request_id != last_seen_id:
|
|
62
|
+
last_seen_id = latest.request_id
|
|
63
|
+
payload = {
|
|
64
|
+
"request_id": latest.request_id,
|
|
65
|
+
"timestamp": latest.timestamp.isoformat() if latest.timestamp else "",
|
|
66
|
+
"prompt": latest.prompt,
|
|
67
|
+
"task_type": latest.task_type,
|
|
68
|
+
"complexity": latest.complexity,
|
|
69
|
+
"selected_model": latest.selected_model,
|
|
70
|
+
"provider": latest.provider,
|
|
71
|
+
"status": latest.status,
|
|
72
|
+
"total_latency_ms": latest.total_latency_ms,
|
|
73
|
+
"estimated_cost": latest.estimated_cost,
|
|
74
|
+
}
|
|
75
|
+
yield {
|
|
76
|
+
"event": "traffic_event",
|
|
77
|
+
"data": json.dumps(payload),
|
|
78
|
+
}
|
|
79
|
+
except Exception:
|
|
80
|
+
pass
|
|
81
|
+
await asyncio.sleep(1.5)
|
|
82
|
+
|
|
83
|
+
return EventSourceResponse(event_generator())
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
# Serve Bundled Frontend (SPA) if static directory exists
|
|
87
|
+
STATIC_DIR = os.path.join(os.path.dirname(__file__), "static")
|
|
88
|
+
|
|
89
|
+
if os.path.exists(STATIC_DIR):
|
|
90
|
+
assets_dir = os.path.join(STATIC_DIR, "assets")
|
|
91
|
+
if os.path.exists(assets_dir):
|
|
92
|
+
app.mount("/assets", StaticFiles(directory=assets_dir), name="assets")
|
|
93
|
+
|
|
94
|
+
@app.get("/{full_path:path}")
|
|
95
|
+
async def serve_spa(full_path: str):
|
|
96
|
+
if full_path.startswith("api/") or full_path.startswith("docs") or full_path.startswith("openapi.json"):
|
|
97
|
+
raise HTTPException(status_code=404, detail="Not Found")
|
|
98
|
+
|
|
99
|
+
target_file = os.path.join(STATIC_DIR, full_path)
|
|
100
|
+
if os.path.exists(target_file) and os.path.isfile(target_file):
|
|
101
|
+
return FileResponse(target_file)
|
|
102
|
+
return FileResponse(os.path.join(STATIC_DIR, "index.html"))
|
|
103
|
+
else:
|
|
104
|
+
@app.get("/")
|
|
105
|
+
async def root():
|
|
106
|
+
return {
|
|
107
|
+
"message": "Model Router AI Control Room Backend is active.",
|
|
108
|
+
"docs": "/docs",
|
|
109
|
+
"health": "/api/health",
|
|
110
|
+
}
|
|
111
|
+
|
{model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/model_router_cli.egg-info/PKG-INFO
RENAMED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: model-router-cli
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: Intelligent, explainable LLM request routing platform & AI Traffic Control Room
|
|
5
5
|
Author-email: PicadoLabs <picadolabs@gmail.com>
|
|
6
|
+
Maintainer-email: Kaap10 <picadolabs@gmail.com>
|
|
6
7
|
License: MIT
|
|
7
8
|
Project-URL: Homepage, https://picadolabs.me
|
|
8
9
|
Project-URL: Repository, https://github.com/PicadoLabs/ai-model-router
|
|
@@ -37,6 +38,10 @@ Dynamic: license-file
|
|
|
37
38
|
|
|
38
39
|
# Model Router
|
|
39
40
|
|
|
41
|
+
[](https://pypi.org/project/model-router-cli/)
|
|
42
|
+
[](https://pypi.org/project/model-router-cli/)
|
|
43
|
+
[](https://opensource.org/licenses/MIT)
|
|
44
|
+
|
|
40
45
|
Intelligent, explainable, cost- and latency-aware LLM request routing platform and AI Traffic Control Room.
|
|
41
46
|
|
|
42
47
|
---
|
|
@@ -103,9 +108,32 @@ The platform is designed local-first, allowing full local development and testin
|
|
|
103
108
|
- Node.js 18+ and npm
|
|
104
109
|
- (Optional) [Ollama](https://ollama.com/) for local model inference
|
|
105
110
|
|
|
111
|
+
## 📦 Quick Installation (via PyPI)
|
|
112
|
+
|
|
113
|
+
Install Model Router and its embedded **AI Traffic Control Room** dashboard directly from PyPI:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
pip install model-router-cli
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Quick Commands:
|
|
120
|
+
```bash
|
|
121
|
+
# Run system diagnostics & environment checks
|
|
122
|
+
modelrouter doctor
|
|
123
|
+
|
|
124
|
+
# Launch the Traffic Control Room Dashboard & API Gateway in your browser
|
|
125
|
+
modelrouter ui --open-browser
|
|
126
|
+
|
|
127
|
+
# Route a prompt and inspect the explainability decision (Dry Run)
|
|
128
|
+
modelrouter route "Write an optimized async task worker in Python"
|
|
129
|
+
|
|
130
|
+
# Route and execute inference through the optimal provider
|
|
131
|
+
modelrouter run "Explain the difference between zero-shot and few-shot prompting"
|
|
132
|
+
```
|
|
133
|
+
|
|
106
134
|
---
|
|
107
135
|
|
|
108
|
-
## Installation & Setup
|
|
136
|
+
## Installation & Setup (from Source)
|
|
109
137
|
|
|
110
138
|
### 1. Clone the Repository
|
|
111
139
|
```bash
|
|
@@ -189,23 +217,29 @@ npm run dev
|
|
|
189
217
|
|
|
190
218
|
## CLI Usage
|
|
191
219
|
|
|
192
|
-
The built-in Typer CLI provides terminal commands for inspection, diagnostics, and testing:
|
|
220
|
+
The built-in Typer CLI provides terminal commands for inspection, diagnostics, and testing (use `modelrouter` if installed via pip, or `python backend/app/cli/main.py` from source):
|
|
193
221
|
|
|
194
222
|
```bash
|
|
223
|
+
# Launch the AI Traffic Control Room Web UI and API Gateway
|
|
224
|
+
modelrouter ui --open-browser
|
|
225
|
+
|
|
195
226
|
# Run system diagnostics & provider health checks
|
|
196
|
-
|
|
227
|
+
modelrouter doctor
|
|
197
228
|
|
|
198
229
|
# Inspect routing decision for a prompt without executing (Dry Run)
|
|
199
|
-
|
|
230
|
+
modelrouter route "Write a Python function to parse JSON"
|
|
200
231
|
|
|
201
232
|
# Route and execute a query through the selected model
|
|
202
|
-
|
|
233
|
+
modelrouter run "Debug this distributed async deadlock in worker pool"
|
|
203
234
|
|
|
204
235
|
# List all registered models in the catalog
|
|
205
|
-
|
|
236
|
+
modelrouter models
|
|
237
|
+
|
|
238
|
+
# View recent routed traffic logs
|
|
239
|
+
modelrouter traffic
|
|
206
240
|
|
|
207
241
|
# View system-wide routing performance and cost savings analytics
|
|
208
|
-
|
|
242
|
+
modelrouter analytics
|
|
209
243
|
```
|
|
210
244
|
|
|
211
245
|
---
|
|
@@ -338,6 +372,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
|
|
|
338
372
|
|
|
339
373
|
Maintained and architected by **PicadoLabs**.
|
|
340
374
|
|
|
375
|
+
- **Maintainer**: [@Kaap10](https://github.com/Kaap10)
|
|
341
376
|
- **Organization**: [PicadoLabs](https://github.com/PicadoLabs)
|
|
342
377
|
- **Website**: [https://picadolabs.me](https://picadolabs.me)
|
|
343
378
|
- **Contact**: [picadolabs@gmail.com](mailto:picadolabs@gmail.com)
|
|
@@ -4,13 +4,16 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "model-router-cli"
|
|
7
|
-
version = "1.0.
|
|
7
|
+
version = "1.0.2"
|
|
8
8
|
description = "Intelligent, explainable LLM request routing platform & AI Traffic Control Room"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
11
11
|
authors = [
|
|
12
12
|
{ name = "PicadoLabs", email = "picadolabs@gmail.com" }
|
|
13
13
|
]
|
|
14
|
+
maintainers = [
|
|
15
|
+
{ name = "Kaap10", email = "picadolabs@gmail.com" }
|
|
16
|
+
]
|
|
14
17
|
license = { text = "MIT" }
|
|
15
18
|
keywords = ["llm", "ai", "router", "fastapi", "ollama", "openai", "cost-optimization"]
|
|
16
19
|
classifiers = [
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/providers/external_providers.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/static/assets/index-CQFztymk.js
RENAMED
|
File without changes
|
{model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/app/static/assets/index-DWa3sE4Y.css
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/model_router_cli.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/model_router_cli.egg-info/requires.txt
RENAMED
|
File without changes
|
{model_router_cli-1.0.0 → model_router_cli-1.0.2}/backend/model_router_cli.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|