[PR #11596] fix: prevent infinite retry loop for Kimi K2.5 reasoning field errors #13857

Open
opened 2026-02-16 18:18:41 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/11596

State: open
Merged: No


Summary

  • Detect validation errors about unsupported reasoning fields (reasoning_content, reasoning_details)
  • Mark these 400 errors as non-retryable to prevent infinite retry loops
  • Affects Kimi K2.5 models when routed through Together/Fireworks via OpenRouter

Test Plan

  • Added 4 test cases in retry.test.ts
  • Verified reasoning field errors → non-retryable
  • Verified non-reasoning 400 errors → still retryable
  • Verified 429 rate limit errors → still retryable

Fixes #11541

🤖 Generated with Claude Code

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/11596 **State:** open **Merged:** No --- ## Summary - Detect validation errors about unsupported reasoning fields (reasoning_content, reasoning_details) - Mark these 400 errors as non-retryable to prevent infinite retry loops - Affects Kimi K2.5 models when routed through Together/Fireworks via OpenRouter ## Test Plan - Added 4 test cases in retry.test.ts - Verified reasoning field errors → non-retryable - Verified non-reasoning 400 errors → still retryable - Verified 429 rate limit errors → still retryable Fixes #11541 🤖 Generated with [Claude Code](https://claude.com/claude-code)
yindo added the pull-request label 2026-02-16 18:18:41 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13857