LocalAI/core/http/auth
Richard Palethorpe c60ed75258 feat(middleware): Model routing, PII filtering, Cloud model proxies
Add a routing middleware stack and a cloud-proxy backend.

* cloud-proxy: a Go gRPC backend that forwards OpenAI- and
  Anthropic-shaped chat requests to upstream providers, with an
  optional translate mode (OpenAI request -> Anthropic /v1/messages
  -> OpenAI response) and full tool-calling support.

* routing: admission control, content-aware model routing
  (embedding cache + classifier + rerank + Arch-Router score),
  PII detection/redaction (regex + NER) with streaming filter and
  OpenAI/Anthropic adapters, and a per-user/per-key billing recorder
  backed by GORM or in-memory storage.

* middleware: UsageMiddleware records usage via the billing recorder,
  plus admission, route-model, usage-stamp and trace middlewares.

* observability: BackendTrace ring buffer stores full request bodies
  (capped), MITM proxy emits structured trace events, and router
  classifier decisions surface at /api/router/decide.

* gallery: Arch-Router-1.5B (Q4_K_M and Q8_0).

* UI: cloud-proxy model-editor fields, classifier system-prompt and
  score-normalization config, and a Traces page rendering request
  bodies.

Assisted-by: claude-code:claude-opus-4-7 [Read] [Edit] [Bash]
Signed-off-by: Richard Palethorpe <io@richiejp.com>
2026-05-24 09:42:31 +01:00
..
apikeys.go feat: add users and authentication support (#9061) 2026-03-19 21:40:51 +01:00
apikeys_test.go feat: add users and authentication support (#9061) 2026-03-19 21:40:51 +01:00
auth_suite_test.go chore: Security hardening (#9719) 2026-05-08 16:25:45 +02:00
branding_routes_test.go feat(branding): admin-configurable instance name, tagline, and assets (#9635) 2026-05-02 15:51:36 +02:00
db.go feat(usage): track and visualise usage per API key (#9920) 2026-05-21 16:34:02 +02:00
db_nosqlite.go feat: add users and authentication support (#9061) 2026-03-19 21:40:51 +01:00
db_sqlite.go feat: add users and authentication support (#9061) 2026-03-19 21:40:51 +01:00
db_test.go feat: add users and authentication support (#9061) 2026-03-19 21:40:51 +01:00
features.go feat(api): add /v1/audio/diarization endpoint with sherpa-onnx + vibevoice.cpp (#9654) 2026-05-05 15:10:13 +02:00
helpers_test.go feat: add users and authentication support (#9061) 2026-03-19 21:40:51 +01:00
middleware.go feat(usage): track and visualise usage per API key (#9920) 2026-05-21 16:34:02 +02:00
middleware_test.go feat(usage): track and visualise usage per API key (#9920) 2026-05-21 16:34:02 +02:00
models.go feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
oauth.go chore: Security hardening (#9719) 2026-05-08 16:25:45 +02:00
oauth_email_decision.go chore: Security hardening (#9719) 2026-05-08 16:25:45 +02:00
oauth_email_decision_test.go chore: Security hardening (#9719) 2026-05-08 16:25:45 +02:00
password.go chore: Security hardening (#9719) 2026-05-08 16:25:45 +02:00
password_test.go chore: Security hardening (#9719) 2026-05-08 16:25:45 +02:00
permissions.go feat(api): add /v1/audio/diarization endpoint with sherpa-onnx + vibevoice.cpp (#9654) 2026-05-05 15:10:13 +02:00
quota.go feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
roles.go feat: add users and authentication support (#9061) 2026-03-19 21:40:51 +01:00
roles_test.go feat: add users and authentication support (#9061) 2026-03-19 21:40:51 +01:00
session.go feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
session_test.go feat: add users and authentication support (#9061) 2026-03-19 21:40:51 +01:00
usage.go feat(middleware): Model routing, PII filtering, Cloud model proxies 2026-05-24 09:42:31 +01:00
usage_test.go feat(usage): attribute Sources rows to user accounts in admin view (#9935) 2026-05-21 23:23:06 +02:00
users.go fix(auth): cascade user deletion across all owned data on PostgreSQL (#9702) 2026-05-07 08:28:58 +02:00
users_test.go fix(auth): cascade user deletion across all owned data on PostgreSQL (#9702) 2026-05-07 08:28:58 +02:00