Files
traefik-llmgateway/testdata/router_fixtures_holdout3/chitchat.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

266 lines
4.2 KiB
JSON

[
{
"id": "h3-c01",
"group": "chitchat",
"lang": "en",
"intent": "chitchat",
"wire": "openai",
"request": {
"model": "smart/auto",
"messages": [
{
"role": "user",
"content": "hey"
}
]
},
"session": null,
"minTier": 0,
"maxTier": 0,
"notes": "casual"
},
{
"id": "h3-c02",
"group": "chitchat",
"lang": "en",
"intent": "chitchat",
"wire": "openai",
"request": {
"model": "smart/auto",
"messages": [
{
"role": "user",
"content": "lol that was a long day"
}
]
},
"session": null,
"minTier": 0,
"maxTier": 0,
"notes": "casual"
},
{
"id": "h3-c03",
"group": "chitchat",
"lang": "en",
"intent": "chitchat",
"wire": "anthropic",
"request": {
"model": "smart/auto",
"max_tokens": 4096,
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "whats a good name for a black cat"
}
]
}
]
},
"session": null,
"minTier": 0,
"maxTier": 0,
"notes": "casual"
},
{
"id": "h3-c04",
"group": "chitchat",
"lang": "en",
"intent": "chitchat",
"wire": "openai",
"request": {
"model": "smart/auto",
"messages": [
{
"role": "user",
"content": "can you recommend a sci-fi book like the martian"
}
]
},
"session": null,
"minTier": 0,
"maxTier": 0,
"notes": "casual"
},
{
"id": "h3-c05",
"group": "chitchat",
"lang": "en",
"intent": "chitchat",
"wire": "openai",
"request": {
"model": "smart/auto",
"messages": [
{
"role": "user",
"content": "i'm bored"
}
]
},
"session": null,
"minTier": 0,
"maxTier": 0,
"notes": "casual"
},
{
"id": "h3-c06",
"group": "chitchat",
"lang": "en",
"intent": "chitchat",
"wire": "anthropic",
"request": {
"model": "smart/auto",
"max_tokens": 4096,
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "tell me a fun fact"
}
]
}
]
},
"session": null,
"minTier": 0,
"maxTier": 0,
"notes": "casual"
},
{
"id": "h3-c07",
"group": "chitchat",
"lang": "en",
"intent": "chitchat",
"wire": "openai",
"request": {
"model": "smart/auto",
"messages": [
{
"role": "user",
"content": "good night!"
}
]
},
"session": null,
"minTier": 0,
"maxTier": 0,
"notes": "casual"
},
{
"id": "h3-c08",
"group": "chitchat",
"lang": "en",
"intent": "chitchat",
"wire": "openai",
"request": {
"model": "smart/auto",
"messages": [
{
"role": "user",
"content": "who would win, a gorilla or 100 ducks"
}
]
},
"session": null,
"minTier": 0,
"maxTier": 0,
"notes": "casual"
},
{
"id": "h3-c09",
"group": "chitchat",
"lang": "en",
"intent": "chitchat",
"wire": "anthropic",
"request": {
"model": "smart/auto",
"max_tokens": 4096,
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "what do you think about pineapple on pizza"
}
]
}
]
},
"session": null,
"minTier": 0,
"maxTier": 0,
"notes": "casual"
},
{
"id": "h3-c10",
"group": "chitchat",
"lang": "en",
"intent": "chitchat",
"wire": "openai",
"request": {
"model": "smart/auto",
"messages": [
{
"role": "user",
"content": "how are you today"
}
]
},
"session": null,
"minTier": 0,
"maxTier": 0,
"notes": "casual"
},
{
"id": "h3-c11",
"group": "chitchat",
"lang": "en",
"intent": "chitchat",
"wire": "openai",
"request": {
"model": "smart/auto",
"messages": [
{
"role": "user",
"content": "do you think ai will take over my job"
}
]
},
"session": null,
"minTier": 0,
"maxTier": 1,
"notes": "casual"
},
{
"id": "h3-c12",
"group": "chitchat",
"lang": "en",
"intent": "chitchat",
"wire": "anthropic",
"request": {
"model": "smart/auto",
"max_tokens": 4096,
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "my friend keeps cancelling plans, should i be annoyed"
}
]
}
]
},
"session": null,
"minTier": 0,
"maxTier": 1,
"notes": "casual"
}
]