[PR #860] [MERGED] fix(session): add fallback for undefined output token limit #9729

Closed
opened 2026-02-16 18:14:04 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/860
Author: @svkozak
Created: 7/10/2025
Status: Merged
Merged: 7/11/2025
Merged by: @thdxr

Base: devHead: fix


📝 Commits (1)

  • 4ab12b4 fix(session): add fallback for undefined output token limit

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 packages/opencode/src/session/index.ts (+1 -1)

📄 Description

Summary

  • Add fallback value for output token limit calculation to prevent undefined values
  • Ensures outputLimit always has a valid numeric value when Math.min() returns undefined

Test plan

  • Verify the change handles edge cases where model.info.limit.output is undefined
  • Confirm existing functionality remains intact

🤖 Generated with opencode


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/860 **Author:** [@svkozak](https://github.com/svkozak) **Created:** 7/10/2025 **Status:** ✅ Merged **Merged:** 7/11/2025 **Merged by:** [@thdxr](https://github.com/thdxr) **Base:** `dev` ← **Head:** `fix` --- ### 📝 Commits (1) - [`4ab12b4`](https://github.com/anomalyco/opencode/commit/4ab12b4d66711ac2462e2edbd3e2711557e2a2df) fix(session): add fallback for undefined output token limit ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/opencode/src/session/index.ts` (+1 -1) </details> ### 📄 Description ## Summary - Add fallback value for output token limit calculation to prevent undefined values - Ensures `outputLimit` always has a valid numeric value when `Math.min()` returns undefined ## Test plan - [x] Verify the change handles edge cases where `model.info.limit.output` is undefined - [x] Confirm existing functionality remains intact 🤖 Generated with [opencode](https://opencode.ai) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:14:04 -05:00
yindo closed this issue 2026-02-16 18:14:04 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9729