Commit Graph
2 Commits
Author SHA1 Message Date
lukaszraczyloandGitHub 7fade3cdee feat(models): advertise max_context_length and query every modelBaseUrls upstream (#22)
GET /v1/models now emits max_context_length next to the other context
fields, so a downstream gateway can read it through metadataPath. The
field is omitted when the context window is unknown.

Discovery and metadataPath now query baseUrl and each distinct
modelBaseUrls upstream. The gateway keeps an id only from the upstream
that serves it. Discovery fails when any upstream fails and keeps the
last-known set. Metadata keeps the ids of the upstreams that answered.
2026-11-28 01:19:54 +00:00
lukaszraczyloandGitHub 4c61d19a72 feat(router): smart routers and per-member rate limits (#9)
Add smart routers: virtual models that score each request and route it to admin-defined model tiers. A retryable failure moves the request to a higher tier. The classifier v2 extracts prose, finds the original ask in long tool loops, adds an uncertainty margin and reads tool-output failures. Sessions, outcome signals, bounded calibration, adaptive selection within a tier, gated saturation downgrade, a first-byte timeout and an opt-in timeout fallback are included. Every new feature is off by default.

Add per-member group limits, a tokensPerMinute window that counts uncached input and output, rate-limit headers in three dialects, soft pacing before the hard limit, and a limitExemptKinds list so embedding and reranking traffic never counts toward or hits a limit.

Fix yaegi named-result state that made smartContentSize grow between calls.
2026-11-25 00:40:30 +00:00