Files
traefik-llmgateway/testdata/router_fixtures_holdout2/followup.json
T
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

195 lines
4.4 KiB
JSON

[
{
"id": "h2-f01",
"group": "followup",
"lang": "en",
"intent": "followup",
"wire": "openai",
"request": {
"model": "smart/auto",
"messages": [
{
"role": "user",
"content": "write a go function that parses semver strings with optional prerelease and build metadata, return a struct"
},
{
"role": "assistant",
"content": "```go\ntype Version struct{Major,Minor,Patch int; Pre, Build string}\nfunc Parse(s string)(Version,error){ ... }\n```"
},
{
"role": "user",
"content": "ok now make it compare per the spec"
},
{
"role": "assistant",
"content": "```go\nfunc (v Version) Compare(o Version) int { ... }\n```"
},
{
"role": "user",
"content": "prerelease ordering is wrong for numeric vs alpha ids, fix"
}
]
},
"session": {"replay": true},
"minTier": 1,
"maxTier": 2,
"notes": "session-required: semver precedence rule for identifiers; mid"
},
{
"id": "h2-f02",
"group": "followup",
"lang": "en",
"intent": "followup",
"wire": "openai",
"request": {
"model": "smart/auto",
"messages": [
{
"role": "user",
"content": "can you explain what a mutex is"
},
{
"role": "assistant",
"content": "A mutex is a lock that lets only one thread enter a critical section at a time."
},
{
"role": "user",
"content": "and a semaphore?"
}
]
},
"session": {"replay": true},
"minTier": 0,
"maxTier": 0,
"notes": "session-required: follow-up on definitions; low"
},
{
"id": "h2-f03",
"group": "followup",
"lang": "en",
"intent": "followup",
"wire": "openai",
"request": {
"model": "smart/auto",
"messages": [
{
"role": "user",
"content": "our k8s pods get OOMKilled, limit 512Mi, node has plenty"
},
{
"role": "assistant",
"content": "Check whether the JVM heap is sized relative to the container limit; -Xmx plus metaspace and threads can exceed 512Mi."
},
{
"role": "user",
"content": "its go not java"
},
{
"role": "assistant",
"content": "In Go, GOMEMLIMIT unset means the runtime ignores the cgroup limit; also check goroutine stacks and cgo."
},
{
"role": "user",
"content": "still dies, heap profile flat. rss grows"
},
{
"role": "assistant",
"content": "what then"
}
]
},
"session": {"replay": true},
"minTier": 1,
"maxTier": 2,
"notes": "session-required: flat heap with growing RSS (mmap, cgo, fragmentation); alone it is terse"
},
{
"id": "h2-f04",
"group": "followup",
"lang": "en",
"intent": "followup",
"wire": "openai",
"request": {
"model": "smart/auto",
"messages": [
{
"role": "user",
"content": "translate 'good luck' to german"
},
{
"role": "assistant",
"content": "Viel Glück!"
},
{
"role": "user",
"content": "and italian"
}
]
},
"session": {"replay": true},
"minTier": 0,
"maxTier": 0,
"notes": "session-required: tiny translation follow-up"
},
{
"id": "h2-f05",
"group": "followup",
"lang": "en",
"intent": "followup",
"wire": "anthropic",
"request": {
"model": "smart/auto",
"max_tokens": 4096,
"messages": [
{
"role": "user",
"content": "design the schema for a multi tenant saas with rbac and audit log"
},
{
"role": "assistant",
"content": "[long schema omitted: tenants, users, roles, permissions, audit_events with partitioning by month]"
},
{
"role": "user",
"content": "can tenants share a role definition but override one permission?"
}
]
},
"session": {"replay": true},
"minTier": 1,
"maxTier": 2,
"notes": "session-required: needs context of the schema and role inheritance modelling"
},
{
"id": "h2-f06",
"group": "followup",
"lang": "en",
"intent": "followup",
"wire": "openai",
"request": {
"model": "smart/auto",
"messages": [
{
"role": "user",
"content": "here is my proof that sqrt(2) is irrational: assume a/b lowest terms, a^2=2b^2, so a even, a=2c, 4c^2=2b^2, b^2=2c^2, b even, contradiction"
},
{
"role": "assistant",
"content": "Correct."
},
{
"role": "user",
"content": "now do cube root of 2"
},
{
"role": "assistant",
"content": "same?"
}
]
},
"session": {"replay": true},
"minTier": 0,
"maxTier": 1,
"notes": "session-required: analogous proof; low plausible, mid safe"
}
]