How thakshil/routelab works
RouteLab classifies a query, applies deterministic policy, and returns a model tier; it does not invoke that model or generate an answer. The principal flow runs from the browser through the API to a configured classifier, then through routing policy to a displayed decision. Jev, Groq, and mock classification are distinct modes; task-shape signals provide a routing floor. The README documents the browser’s same-origin API calls and the external classifier endpoints. Groq’s implementation was not excerpted, so its internal behavior is not detailed here.
Main entry points: query.py Query endpoint · jev_client.py Jev adapter and mock · App.jsx Query interface · config.py Runtime settings
Components 14
Browser UI
- Query interface
frontend/src/App.jsx - Browser API client
frontend/src/services/api.js - UI entry
frontend/src/main.jsx
API and contracts
- FastAPI application
backend/app/main.py - Query endpoint
backend/app/api/query.py - Request and response models
backend/app/schemas.py - Runtime settings
backend/app/config.py
Routing policy
- Tier selection policy
backend/app/services/router.py - Task-shape rules
backend/app/services/task_signals.py
Classification providers
- Jev adapter and mock
backend/app/services/jev_client.py - Groq classifier
backend/app/services/groq_classifier.py
Other components
- User
- TypeSafe Jev
- Groq API
Connections 20
- User → Query interface: enters query
frontend/src/App.jsx - UI entry → Query interface: renders
frontend/src/main.jsx - Query interface → Browser API client: requests status and routing
frontend/src/App.jsx - Browser API client → FastAPI application: calls same-origin API
README.md - FastAPI application → Query endpoint: mounts route
backend/app/main.py - FastAPI application → Runtime settings: reads status mode
backend/app/main.py - Query endpoint → Runtime settings: loads settings
backend/app/api/query.py - Query endpoint → Request and response models: validates and returns
backend/app/api/query.py - Query endpoint → Jev adapter and mock: classifies in Jev or mock mode
backend/app/api/query.py - Query endpoint → Groq classifier: classifies in Groq mode
backend/app/api/query.py - Query endpoint → Tier selection policy: routes judgment
backend/app/api/query.py - Jev adapter and mock → TypeSafe Jev: posts classification request
backend/app/services/jev_client.py - Groq classifier → Groq API: classifies query
README.md - Jev adapter and mock → Runtime settings: uses provider settings
backend/app/services/jev_client.py - Jev adapter and mock → Request and response models: creates judgment
backend/app/services/jev_client.py - Jev adapter and mock → Task-shape rules: uses mock rules
backend/app/services/jev_client.py - Tier selection policy → Runtime settings: selects configured model
backend/app/services/router.py - Tier selection policy → Task-shape rules: applies task floor
backend/app/services/router.py - Browser API client → Query endpoint: posts query
README.md - Query endpoint → Query interface: returns routing result
README.md