[PR #5863] fix: handle providers with no available models to prevent crashes #11623

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

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

State: closed
Merged: No


Summary

  • Fix runtime crashes when providers have no available models
  • Add validation in provider merge process
  • Prevent empty model arrays from breaking ACP agent functionality
  • Graceful degradation with error logging for debugging

Fixes

  • Prevents crashes in model selection dialogs
  • Handles edge cases in provider configuration merges
  • Improves error handling in server API endpoints

Test

OpenCode continues to work against the earlier failed models.json (attatched)
models_broken.json

Closes #5858

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/5863 **State:** closed **Merged:** No --- ## Summary - Fix runtime crashes when providers have no available models - Add validation in provider merge process - Prevent empty model arrays from breaking ACP agent functionality - Graceful degradation with error logging for debugging ## Fixes - Prevents crashes in model selection dialogs - Handles edge cases in provider configuration merges - Improves error handling in server API endpoints ## Test OpenCode continues to work against the earlier failed `models.json` (attatched) [models_broken.json](https://github.com/user-attachments/files/24274718/models_broken.json) Closes #5858
yindo added the pull-request label 2026-02-16 18:16:30 -05:00
yindo closed this issue 2026-02-16 18:16:30 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11623