Releases: xorbitsai/xrouter-llm
Releases · xorbitsai/xrouter-llm
v0.2.3
v0.2.2
What's new
User identity tracking
POST /api/routeaccepts an optionaluser_idfield — the caller identity is persisted with every routing decisionCallStore.record()storesuser_id;recent()andcount()accept an optionaluser_idfilter for per-user scoping in embedding appsRoutingService.route()accepts and threadsuser_idthrough to the call log- Migration 0003 adds a nullable
user_id VARCHAR(255)column with a composite index(user_id, id); applied automatically on startup
Notes for embedding apps (e.g. Xinference Cloud)
- Pass the authenticated user's identity via
user_idin the route request body - Build scoped history endpoints using
store.recent(user_id=...)/store.count(user_id=...)behind your own auth layer GET /api/historyremains an admin-only endpoint (nouser_idfilter) to avoid BOLA
v0.2.1
What's new
Feedback API
PATCH /api/calls/{id}/feedback— record 👍/👎 on any routing decision- UI: thumbs up/down buttons in the history table, with toggle-to-retract support
feedbackcolumn added to the calls table via Alembic migration0002; existing databases are auto-migrated on startup
Validation & robustness
correct_modelaccepted only whenoutcomeis"bad";noterejected whenoutcomeis"retracted"correct_modelcapped at 200 chars,noteat 1 000 chars- JS feedback handler now guards against concurrent clicks and surfaces network/server errors
Legacy DB compatibility
_stamp_legacy_db_if_needednow uses a column→revision checkpoint map, making it future-proof as new migrations are added
v0.2.0
What's new
Serving layer rewrite (FastAPI + SQLAlchemy)
- Replaced the minimal
http.serverbackend with FastAPI + uvicorn; the router is now mountable viacreate_router(service)for direct embedding in Xinference Cloud POST /api/routenow acceptsmodels,config_name(and legacyconfigalias), and all policy params directly — no named config requiredGET /api/history?limit=N&offset=Mreturns paginated results with atotalcountDELETE /api/calls/{id}to remove individual history entries- History UI: pagination, inline delete with confirm, expandable prompt and candidates
Database: SQLAlchemy 2.0 + Alembic
- Migrated from raw
sqlite3to SQLAlchemy 2.0 ORM with full PostgreSQL and MySQL support - Alembic migrations with auto-apply on startup (
auto_migrate=True; setFalsefor multi-worker deployments) --dbkeeps the SQLite path shorthand;--db-urlaccepts full SQLAlchemy URLs;DATABASE_URLenv var also supported- Legacy databases (created before this release) are automatically stamped at startup — no manual migration needed
Routing API
RoutingService.route()now acceptsconfig_name(resolved from named configs) plus individual policy overrides; explicit params take precedence over config defaults- Backward-compatible: existing callers using
config_name=continue to work unchanged
CI
- New
test-databasesjob tests against PostgreSQL 16 and MySQL 8 service containers - Alembic single-head check and downgrade-ability tests
xrouter-llm 0.1.3
Full Changelog: v0.1.2...v0.1.3
xrouter-llm 0.1.2
Changes
- Route multi-model sets by joint completion probability.
- Add task passthrough with backward compatibility for custom predictors.
- Add quality-pair router config.
- Add agentic holdout evaluation helper.
Verification
- PYTHONPATH=src /Users/xuyeqin/miniconda3/bin/python3 -m compileall -q src tests
- PYTHONPATH=src /Users/xuyeqin/miniconda3/bin/python3 -m pytest -q
- python3 -m build
- python3 -m twine check dist/*