Skip to content

fix(progress): retry once on empty progress model output#521

Merged
zbigniewsobiecki merged 1 commit intodevfrom
fix/progress-model-empty-output-retry
Feb 24, 2026
Merged

fix(progress): retry once on empty progress model output#521
zbigniewsobiecki merged 1 commit intodevfrom
fix/progress-model-empty-output-retry

Conversation

@zbigniewsobiecki
Copy link
Copy Markdown
Member

Summary

  • Add single retry with 1s delay in callProgressModelOnce() for intermittent empty responses from Gemini Flash Lite via OpenRouter (~40% failure rate in production logs)
  • Only the failure path adds latency — successful first attempts are unaffected
  • Update existing empty-output tests to cover both retry attempts; add 2 new tests for retry-then-success scenarios (11 total, all passing)

Test plan

  • npm run lint — clean
  • npm run typecheck — clean
  • npm test -- tests/unit/backends/progressModel.test.ts — 11/11 pass
  • Full test suite — 3043/3043 pass
  • Post-deploy: monitor Loki for Progress model failed rate reduction

🤖 Generated with Claude Code

Gemini Flash Lite via OpenRouter intermittently returns streaming
responses with zero text content (~40% failure rate in production).
Add a single retry with 1s delay in callProgressModelOnce() so the
first empty response no longer immediately falls back to the generic
template. Only the failure path adds latency.

Update existing empty-output tests to expect both attempts to fail
before throwing. Add two new tests verifying retry-then-success for
both empty-text and no-events scenarios.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@aaight
Copy link
Copy Markdown
Collaborator

aaight commented Feb 24, 2026

🤔 Just a sec, looking into that retry logic for the progress model

@aaight
Copy link
Copy Markdown
Collaborator

aaight commented Feb 24, 2026

Thanks for taking a look! Let me know if you have any questions about the retry implementation or test coverage. The CI checks are currently running - lint-and-test should complete shortly. 👍

@zbigniewsobiecki zbigniewsobiecki merged commit 70f2090 into dev Feb 24, 2026
5 checks passed
@zbigniewsobiecki zbigniewsobiecki deleted the fix/progress-model-empty-output-retry branch February 24, 2026 10:48
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.

2 participants