Commit Graph
5 Commits
Author SHA1 Message Date
lukaszraczylo 6d1bc2cd33 perf(shared-state): scope decision breaker to decision providers
The decision breaker covered every provider id but a decider only queries its own router provider.
The breaker now covers the sorted, de-duplicated decision providers.
This cuts the refresh key count and the Redis read per tick.
2026-11-26 07:41:30 +00:00
lukaszraczylo 7306511d2b test(yaegi-bench): time a 1,600-key getMulti
The admin usage path reads up to 1,600 keys per round trip.
The bench now reports this cost so the admin-path gain is visible.
2026-11-26 06:28:22 +00:00
lukaszraczylo f01d0cb774 test(yaegi-bench): time a shared-state refresh tick
Add -mode refresh and -mode refresh-native, with -redis and -samples.
The refresh modes register the four shared-state primitives as
wireSharedState does and time refresh, keys, getMulti, apply and flush.
2026-11-26 06:26:06 +00:00
lukaszraczylo 0d1f71b392 feat(router): decision model assist near tier boundaries 2026-11-25 13:51:10 +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