Skip to content

fix: retry empty incomplete streams - #40535

Merged
rekram1-node merged 3 commits into
v2from
robust-retries
Aug 5, 2026
Merged

fix: retry empty incomplete streams#40535
rekram1-node merged 3 commits into
v2from
robust-retries

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • keep terminal-less streams classified as invalid provider output
  • mark that specific contract violation with an incomplete-stream classification
  • retry incomplete streams only while the existing Core output guard confirms no model output started
  • preserve partial terminal-less streams as failed invalid provider output without retrying them

Testing

  • bun typecheck in packages/ai
  • bun test test/adapter.test.ts test/provider/openai-chat.test.ts test/provider/anthropic-messages.test.ts in packages/ai (95 pass)
  • Core retry tests added for both empty and partial incomplete streams; local execution is blocked by missing web-tree-sitter/tree-sitter.wasm and @ff-labs/fff-node dependencies in this checkout

@rekram1-node rekram1-node changed the title fix(ai): retry empty incomplete streams fix: retry empty incomplete streams Aug 5, 2026
@rekram1-node

Copy link
Copy Markdown
Collaborator Author

The failing typecheck is inherited from the current v2 base commit (53b8111121), whose own typecheck run fails with the same packages/app callID errors: https://github.com/anomalyco/opencode/actions/runs/30951048695/job/92132905237

This PR's Linux unit and e2e checks pass. I have not included an unrelated app migration in this retry PR; the check can be rerun after v2 receives the corresponding app fix.

@rekram1-node
rekram1-node merged commit 4ed3437 into v2 Aug 5, 2026
7 of 8 checks passed
@rekram1-node
rekram1-node deleted the robust-retries branch August 5, 2026 00:38
github-actions Bot pushed a commit to ReStranger/opencode that referenced this pull request Aug 5, 2026
* upstream/v2: (28 commits)
  refactor(app): gate unsupported v2 capabilities (anomalyco#40381)
  fix(app): show active search details (anomalyco#40597)
  refactor(app): migrate supported v2 APIs (anomalyco#40378)
  fix(app): reconcile v2 session projections (anomalyco#40376)
  refactor(app): own rendering contracts (anomalyco#40375)
  fix(core): make xAI OAuth device-only (anomalyco#40538)
  test(app): migrate e2e fixtures to v2 (anomalyco#40374)
  fix(core): report missing shell workdir (anomalyco#40542)
  fix(ai): restore Responses tool input semantics (anomalyco#40553)
  fix(ai): classify malformed Responses tool calls (anomalyco#40549)
  feat(tui): streamline tab navigation shortcuts (anomalyco#40551)
  fix(ai): preserve Gemini tool finish semantics (anomalyco#40546)
  fix: retry empty incomplete streams (anomalyco#40535)
  fix(app): finish tool call ID rename (anomalyco#40539)
  refactor: rename tool call ID fields
  fix(client): wait for live service contenders (anomalyco#40515)
  chore(core): drop unreachable AI SDK provider packages (anomalyco#40504)
  fix(tui): update tab titles immediately (anomalyco#40318)
  fix(tui): show branch beside directory (anomalyco#40500)
  feat(vcs): publish branch updates (anomalyco#40371)
  ...
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