Skip to content

feat(metering): emit provider and reasoning tokens in usage CloudEvents - #1201

Open
crstrn13 wants to merge 1 commit into
praxis-proxy:mainfrom
crstrn13:fix/metering-provider-reasoning
Open

crstrn13 wants to merge 1 commit into
praxis-proxy:mainfrom
crstrn13:fix/metering-provider-reasoning

Conversation

@crstrn13

Copy link
Copy Markdown
Contributor

Problem

Metering CloudEvents (inference.tokens.used) were not fully configurable from the deployment. The provider/cluster attribute was derived from ctx.cluster_name(), but the ext-proc adapter hard-codes cluster: None and there was no config field to set it — so the controller could not render a correct value. Reasoning tokens were also not surfaced in the usage event.

See opendatahub-io/praxis-extproc#80.

Changes

  • Add a provider config field to the external_metering filter so the emitted CloudEvents carry a statically configurable provider, independent of ctx.cluster_name().
  • Emit reasoning_tokens in the usage CloudEvent when present.
  • Update examples/configs/external-metering.yaml, filter docs, unit tests, and the example integration suite to cover the new field and reasoning-token emission.

Tests

  • Unit tests in filters/src/metering/tests.rs.
  • Example integration coverage in the external metering suite.

Refs opendatahub-io/praxis-extproc#80

@crstrn13
crstrn13 requested review from a team and franciscojavierarceo September 16, 2026 16:39
Signed-off-by: Alexander Cristurean <acristur@redhat.com>
@crstrn13
crstrn13 force-pushed the fix/metering-provider-reasoning branch from bc97846 to 89ef0cd Compare September 16, 2026 16:42
@crstrn13
crstrn13 requested a review from alexsnaps September 16, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant