Requests can be tagged: metadata, x-llmgw-tags and the user field on the usage record, and counted by the tags router.tag_labels names

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Opus 5.5 committed 2026-10-04 19:45:37 +02:00
1 parent e59ff52932
commit 29a7347df2
19 files changed
+436 -17

No files matched your search

+7
View File
@@ -443,6 +443,13 @@ type Router struct {
// team is what an alert is usually about; "team" is the default.
TenantLabel string `koanf:"tenant_label"`
// TagLabels are the request tags (metadata, x-llmgw-tags) counted in
// llmgw_tagged_requests_total and llmgw_tagged_tokens_total, by value.
// Only these: a tag is the client's to set, and every value of one is
// a series. The first 100 values of each are counted apart, the rest as
// "other". Empty counts none; the usage records keep every tag anyway.
TagLabels []string `koanf:"tag_labels"`
// MaxBodyBytes bounds the request body the router will read.
MaxBodyBytes int64 `koanf:"max_body_bytes"`