-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Context
PR #307 adds deterministic feature attribution to microdollar_usage_metadata via the X-KILOCODE-FEATURE header. All internal features (extensions, CLI, cloud agents, internal services) will send this header. Direct gateway consumers (external API users) currently show as NULL.
Problem
Direct gateway is a WAU feature that needs a positive signal like all other features. NULL in the feature column is reserved for catching tracking issues (e.g. a misconfigured internal feature). If direct gateway traffic is also NULL, we can't distinguish legitimate unattributed external usage from broken internal attribution.
Currently, external consumers can hit both /api/gateway/ and /api/openrouter/, which makes it difficult to positively identify direct gateway traffic at the infrastructure level.
What's needed
A mechanism to positively identify direct gateway traffic so it gets its own feature value (direct-gateway) rather than falling into the unattributed NULL bucket.