← Documentation indexdocs/superpowers/plans/2026-10-12-v3-issue-230.md

V3 Issue #230 — Structured Provider Streaming Plan

Issue-specific implementation plan for #230, covering R006. This branch is based on the #229 PR head; keep its dependency explicit until #229 merges.

Goal: Expose typed provider stream events and complete ModelResponse terminal state while preserving cancellation, deadlines, retries, usage accounting, and legacy text streams.

Architecture: Add immutable SDK-independent event records in providers/models.py; implement streaming at the provider adapter layer; route both stream and non-stream requests through the existing shared runtime boundary in providers/calls.py. Preserve provider-native tool/reasoning continuation from #229. Keep runtime event redesign (#255) out of scope.

Constraints: No new dependency, provider calls, or tool execution. No retry/fallback after content is delivered. Cancellation, malformed arguments, duplicate call IDs, and protocol termination errors must be terminal. Legacy chat_stream() remains a text-only projection.

Scope and compatibility

Task 1: Event contract and shared runtime boundary

Files: openkyrozen/providers/models.py, openkyrozen/providers/__init__.py, openkyrozen/providers/calls.py, tests.

Task 2: Native adapter streams

Files: all adapter families in openkyrozen/providers/, adapter fixtures.

Task 3: Retry, usage, docs, and delivery

Validation

Validation record