Skip to content

Releases: xorbitsai/xrouter-llm

v0.2.3

29 Jun 04:48

Choose a tag to compare

Add owner_user_id to CallStore.delete and CallStore.set_feedback for per-user ownership enforcement in embedding apps.

v0.2.2

28 Jun 16:26
7ccd73c

Choose a tag to compare

What's new

User identity tracking

  • POST /api/route accepts an optional user_id field — the caller identity is persisted with every routing decision
  • CallStore.record() stores user_id; recent() and count() accept an optional user_id filter for per-user scoping in embedding apps
  • RoutingService.route() accepts and threads user_id through 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_id in the route request body
  • Build scoped history endpoints using store.recent(user_id=...) / store.count(user_id=...) behind your own auth layer
  • GET /api/history remains an admin-only endpoint (no user_id filter) to avoid BOLA

v0.2.1

28 Jun 07:52
c236aad

Choose a tag to compare

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
  • feedback column added to the calls table via Alembic migration 0002; existing databases are auto-migrated on startup

Validation & robustness

  • correct_model accepted only when outcome is "bad"; note rejected when outcome is "retracted"
  • correct_model capped at 200 chars, note at 1 000 chars
  • JS feedback handler now guards against concurrent clicks and surfaces network/server errors

Legacy DB compatibility

  • _stamp_legacy_db_if_needed now uses a column→revision checkpoint map, making it future-proof as new migrations are added

v0.2.0

26 Jun 19:08
73c6726

Choose a tag to compare

What's new

Serving layer rewrite (FastAPI + SQLAlchemy)

  • Replaced the minimal http.server backend with FastAPI + uvicorn; the router is now mountable via create_router(service) for direct embedding in Xinference Cloud
  • POST /api/route now accepts models, config_name (and legacy config alias), and all policy params directly — no named config required
  • GET /api/history?limit=N&offset=M returns paginated results with a total count
  • DELETE /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 sqlite3 to SQLAlchemy 2.0 ORM with full PostgreSQL and MySQL support
  • Alembic migrations with auto-apply on startup (auto_migrate=True; set False for multi-worker deployments)
  • --db keeps the SQLite path shorthand; --db-url accepts full SQLAlchemy URLs; DATABASE_URL env var also supported
  • Legacy databases (created before this release) are automatically stamped at startup — no manual migration needed

Routing API

  • RoutingService.route() now accepts config_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-databases job tests against PostgreSQL 16 and MySQL 8 service containers
  • Alembic single-head check and downgrade-ability tests

xrouter-llm 0.1.3

24 Jun 06:04

Choose a tag to compare

xrouter-llm 0.1.2

23 Jun 13:40
fc11d5f

Choose a tag to compare

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/*

v0.1.1

20 Jun 17:19
d74f944

Choose a tag to compare

Cost-aware fallback: when no candidate clears the completion threshold, route to the cheapest model within fallback_quality_margin (default 0.05) of the best predicted completion, instead of the priciest highest-completion model. Plus README polish.

v0.1.0

19 Jun 18:56
3b53d27

Choose a tag to compare

First PyPI release of xrouter-llm: a prompt-aware LLM routing-decision service (factored IRT router). Ships a trained router, the model-profile registry, and router configs as package data, so pip install xrouter-llm works out of the box.