Skip to content

Direct gateway traffic needs positive feature identification #329

@pedroheyerdahl

Description

@pedroheyerdahl

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.

cc @jrf0110 @chrarnoldus

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions