Skip to content

revert(ai-gateway): remove temporary stream diagnostics#3976

Open
marius-kilocode wants to merge 1 commit into
mainfrom
marius/revert-stream-lifecycle-observability-main
Open

revert(ai-gateway): remove temporary stream diagnostics#3976
marius-kilocode wants to merge 1 commit into
mainfrom
marius/revert-stream-lifecycle-observability-main

Conversation

@marius-kilocode

Copy link
Copy Markdown
Contributor

Summary

#3946 added temporary lifecycle instrumentation for direct-provider SSE responses while investigating response loss. The instrumentation adds stream parsing and hashing, sampled lifecycle records, and an x-kilo-attempt-id response header to the normal request path.

Revert #3946 now that the diagnostic change is no longer needed. This removes both stream observers and their scanner tests, removes lifecycle classification and sampled logging, removes the diagnostic response header, and restores the gateway route's prior response fan-out and return behavior.

Verification

N/A

Visual Changes

N/A

Reviewer Notes

This is a removal-only revert of #3946 and does not introduce a replacement stream-lifetime behavior.

@kilo-code-bot

kilo-code-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Clean removal-only revert of #3946 that deletes the temporary stream lifecycle instrumentation (stream-lifecycle.server.ts, its tests, and all usage in route.ts) without introducing any new logic.

Files Reviewed (3 files)
  • apps/web/src/app/api/openrouter/[...path]/route.ts — stream observer usage removed, diagnostic header removed, response path simplified
  • apps/web/src/lib/ai-gateway/o11y/stream-lifecycle.server.ts — deleted (316 lines)
  • apps/web/src/lib/ai-gateway/o11y/stream-lifecycle.server.test.ts — deleted (409 lines)

Reviewed by claude-sonnet-4.6 · 233,995 tokens

Review guidance: REVIEW.md from base branch main

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