Skip to content

revert: mid-stream fallback (#882) - #896

Merged
jarvis9443 merged 1 commit into
mainfrom
revert-882-midstream-fallback
Aug 5, 2026
Merged

revert: mid-stream fallback (#882)#896
jarvis9443 merged 1 commit into
mainfrom
revert-882-midstream-fallback

Conversation

@jarvis9443

@jarvis9443 jarvis9443 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Reverts #882. The mid-stream continuation feature is paused pending re-evaluation of the requirement — see api7/AISIX-Cloud#1222 (feature never shipped in a release, so no user-visible change). Ref api7/AISIX-Cloud#1222

Summary by CodeRabbit

  • Breaking Changes
    • Removed mid-stream fallback and continuation handling for streaming responses.
    • Removed routing configuration for stream failure behavior.
    • Removed stream outcome details from usage events and related fallback metrics.
    • Updated routing and model schemas to no longer expose stream failure settings.
  • Bug Fixes
    • Simplified streaming completion and telemetry behavior by eliminating mid-stream failover classifications.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 983bfa3c-8b96-486f-a39b-11aaf3e80e73

📥 Commits

Reviewing files that changed from the base of the PR and between 6de5738 and b39ad41.

📒 Files selected for processing (13)
  • crates/aisix-admin/src/openapi.rs
  • crates/aisix-core/src/lib.rs
  • crates/aisix-core/src/models/mod.rs
  • crates/aisix-core/src/models/routing.rs
  • crates/aisix-obs/src/metrics.rs
  • crates/aisix-obs/src/usage.rs
  • crates/aisix-proxy/src/chat.rs
  • crates/aisix-proxy/src/lib.rs
  • crates/aisix-proxy/src/routing.rs
  • crates/aisix-proxy/src/stream_failover.rs
  • schemas/resources/model.schema.json
  • schemas/resources/routing.schema.json
  • tests/e2e/src/cases/mid-stream-fallback-e2e.test.ts
💤 Files with no reviewable changes (10)
  • crates/aisix-proxy/src/routing.rs
  • schemas/resources/model.schema.json
  • crates/aisix-obs/src/usage.rs
  • crates/aisix-admin/src/openapi.rs
  • crates/aisix-core/src/models/routing.rs
  • tests/e2e/src/cases/mid-stream-fallback-e2e.test.ts
  • schemas/resources/routing.schema.json
  • crates/aisix-proxy/src/stream_failover.rs
  • crates/aisix-obs/src/metrics.rs
  • crates/aisix-proxy/src/lib.rs

📝 Walkthrough

Walkthrough

The change removes mid-stream failure configuration, failover execution, continuation handling, related telemetry, schema definitions, OpenAPI mappings, and end-to-end coverage.

Changes

Mid-stream failover removal

Layer / File(s) Summary
Routing contracts and schemas
crates/aisix-core/src/models/routing.rs, crates/aisix-core/src/models/mod.rs, crates/aisix-core/src/lib.rs, schemas/resources/model.schema.json, schemas/resources/routing.schema.json, crates/aisix-admin/src/openapi.rs, crates/aisix-proxy/src/routing.rs
Removes mid-stream failure routing types, fields, exports, schema definitions, OpenAPI mappings, and fixture initialization.
Streaming execution and telemetry
crates/aisix-proxy/src/chat.rs, crates/aisix-proxy/src/stream_failover.rs, crates/aisix-proxy/src/lib.rs, crates/aisix-obs/src/metrics.rs, crates/aisix-obs/src/usage.rs, tests/e2e/src/cases/mid-stream-fallback-e2e.test.ts
Removes failover state, continuation requests, failed-attempt accounting, stream outcome fields, fallback metrics, the failover module, and its end-to-end tests. Streaming completion retains existing reservation accounting and error-frame handling.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

  • api7/aisix#882: Introduced the mid-stream fallback functionality removed by this change.
  • api7/aisix#893: Added and extended the same mid-stream failover functionality.
  • api7/aisix#886: Modified the deleted stream_failover module.

Suggested reviewers: moonming

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly states that the pull request reverts the mid-stream fallback feature and references the reverted pull request.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
E2e Test Quality Review ✅ Passed The revert removes an unshipped feature, while existing E2E tests cover real etcd→gateway→HTTP-upstream flows for mid-stream timeout termination, no fallback, disconnects, and cancellation.
Security Check ✅ Passed This PR safely reverts the mid-stream fallback feature by cleanly removing 1888 lines. No credentials, secrets, or PII are exposed; logging follows best practices with proper scoping of sensitive f...
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch revert-882-midstream-fallback

Comment @coderabbitai help to get the list of available commands.

@jarvis9443
jarvis9443 merged commit b5878b5 into main Aug 5, 2026
10 checks passed
@jarvis9443
jarvis9443 deleted the revert-882-midstream-fallback branch August 5, 2026 08:18
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