opencode icon indicating copy to clipboard operation
opencode copied to clipboard

fix: handle providers with no available models to prevent crashes

Open ahosker opened this issue 1 month ago • 4 comments

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

ahosker avatar Dec 20 '25 21:12 ahosker

/review

rekram1-node avatar Dec 20 '25 21:12 rekram1-node

Committed the type safety fixes.

ahosker avatar Dec 20 '25 22:12 ahosker

/review

rekram1-node avatar Dec 21 '25 02:12 rekram1-node

lgtm

github-actions[bot] avatar Dec 21 '25 02:12 github-actions[bot]