Skip to content

docs: what / why proposal for stream token counting via SSE eent parsing#611

Merged
shaneutt merged 3 commits into
praxis-proxy:mainfrom
szedan-rh:issues_211
Jun 19, 2026
Merged

docs: what / why proposal for stream token counting via SSE eent parsing#611
shaneutt merged 3 commits into
praxis-proxy:mainfrom
szedan-rh:issues_211

Conversation

@szedan-rh

Copy link
Copy Markdown
Contributor

issue: #211
discussion: #20
status: proposed
authors:

  • szedan-rh
    graduation_criteria:
  • SSE parser correctly accumulates token counts for all five providers
  • Both delta and cumulative provider semantics handled
  • Stream completion detection works for all sentinel formats
  • Token counts written to FilterContext via set_token_usage()
  • Non-streaming responses parsed in the same filter
  • Unit tests cover all provider streaming formats
    stakeholders:
  • shaneutt

@szedan-rh szedan-rh requested a review from a team June 16, 2026 15:18
@szedan-rh szedan-rh requested review from shaneutt and twghu as code owners June 16, 2026 15:18
@shaneutt shaneutt self-assigned this Jun 16, 2026
@github-project-automation github-project-automation Bot moved this to Backlog in AI Gateway Jun 16, 2026
@shaneutt shaneutt moved this from Backlog to Review in AI Gateway Jun 16, 2026
@shaneutt shaneutt added this to the v0.4.0 milestone Jun 16, 2026

@praxis-bot praxis-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review

Summary: Adds a what/why proposal document for streaming token counting via SSE event parsing (issue #211).

Overall: The proposal is well-structured with clear motivation, good provider comparison tables, and appropriate scope boundaries. Three issues need attention: all 12 markdown reference links are broken (never defined), the "User Stories" section required by the proposal template is missing, and the frontmatter graduation_criteria field defines implementation-level criteria that are premature for a what/why-only proposal.

Severity Count
Critical 0
Large 1
Medium 2

Reviewed by praxis-bot

across chunks and emitting final totals on stream completion.

This is the filter that connects the existing foundation pieces:
the provider parsing library ([#216], merged as [#510]) and the

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Large] All 12 reference-style markdown links in this document ([#216], [#510], [#212], [#474], [#491], [#493], [#219], [#214], [#21], [#239], [#97], [#20]) are never defined. They render as literal bracketed text, not clickable links. Add link definitions at the bottom of the file, e.g.:

[#20]: https://github.com/praxis-proxy/praxis/issues/20
[#21]: https://github.com/praxis-proxy/praxis/issues/21
[#97]: https://github.com/praxis-proxy/praxis/issues/97
[#212]: https://github.com/praxis-proxy/praxis/issues/212
[#214]: https://github.com/praxis-proxy/praxis/issues/214
[#216]: https://github.com/praxis-proxy/praxis/issues/216
[#219]: https://github.com/praxis-proxy/praxis/issues/219
[#239]: https://github.com/praxis-proxy/praxis/issues/239
[#474]: https://github.com/praxis-proxy/praxis/pull/474
[#491]: https://github.com/praxis-proxy/praxis/pull/491
[#493]: https://github.com/praxis-proxy/praxis/pull/493
[#510]: https://github.com/praxis-proxy/praxis/pull/510

See 00216_provider-token-mapping.md for the existing convention.

@praxis-proxy praxis-proxy deleted a comment from praxis-bot Jun 16, 2026
Comment thread docs/proposals/00211_streaming-token-counting.md
Comment thread docs/proposals/00211_streaming-token-counting.md Outdated
Comment thread docs/proposals/00211_streaming-token-counting.md Outdated
Comment thread docs/proposals/00211_streaming-token-counting.md Outdated
@praxis-proxy praxis-proxy deleted a comment from praxis-bot Jun 19, 2026
@shaneutt shaneutt merged commit 644c7f4 into praxis-proxy:main Jun 19, 2026
16 checks passed
@github-project-automation github-project-automation Bot moved this from Review to Done in AI Gateway Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants