ModelNotFoundError causes UI disruption and stack trace instead of friendly error message #7601

Open
opened 2026-02-16 18:07:42 -05:00 by yindo · 2 comments
Owner

Originally created by @Rejudge-F on GitHub (Jan 26, 2026).

Originally assigned to: @thdxr on GitHub.

Description

When using a non-existent provider/model (e.g., sisypus/xxxx-model from oh-my-opencode),
the application throws ModelNotFoundError which:

  1. CLI mode: Displays a full stack trace instead of a user-friendly error message
  2. TUI/Web mode: May cause UI disruption because the error event is not properly
    published to the client

Steps to Reproduce

opencode run -m "sisypus/xxxx-model" "hello"            

Current Behavior

Shows full stack trace instead of friendly error message.

Expected Behavior

Error: Model not found: sisypus/xxxx-model.

Image
Originally created by @Rejudge-F on GitHub (Jan 26, 2026). Originally assigned to: @thdxr on GitHub. ## Description When using a non-existent provider/model (e.g., `sisypus/xxxx-model` from oh-my-opencode), the application throws `ModelNotFoundError` which: 1. **CLI mode**: Displays a full stack trace instead of a user-friendly error message 2. **TUI/Web mode**: May cause UI disruption because the error event is not properly published to the client ## Steps to Reproduce ```bash opencode run -m "sisypus/xxxx-model" "hello" ``` Current Behavior Shows full stack trace instead of friendly error message. Expected Behavior Error: Model not found: sisypus/xxxx-model. <img width="1908" height="1234" alt="Image" src="https://github.com/user-attachments/assets/ebef349c-a3b6-4660-8cee-8bf8fef261fd" />
Author
Owner

@github-actions[bot] commented on GitHub (Jan 26, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #9582: [FEATURE]: Validate --model argument early with helpful error messages
  • #6853: ACP is broken with 1.1.1 (ProviderModelNotFoundError with big-pickle)
  • #6691: ProviderModelNotFoundError: minimax/MiniMax-M2.1
  • #3993: CLI run --model fails for namespaced models with : or multi-segment paths (truncates modelID)
  • #7958: Custom Provider Configuration Not Loading - ProviderModelNotFoundError

All of these involve ModelNotFoundError or ProviderModelNotFoundError being thrown with poor error handling. The core issue appears to be that model validation errors are not being properly caught and converted to user-friendly messages before being displayed to the user.

Feel free to ignore if your specific case is different from these.

@github-actions[bot] commented on GitHub (Jan 26, 2026): This issue might be a duplicate of existing issues. Please check: - #9582: [FEATURE]: Validate --model argument early with helpful error messages - #6853: ACP is broken with 1.1.1 (ProviderModelNotFoundError with big-pickle) - #6691: ProviderModelNotFoundError: minimax/MiniMax-M2.1 - #3993: CLI run --model fails for namespaced models with : or multi-segment paths (truncates modelID) - #7958: Custom Provider Configuration Not Loading - ProviderModelNotFoundError All of these involve ModelNotFoundError or ProviderModelNotFoundError being thrown with poor error handling. The core issue appears to be that model validation errors are not being properly caught and converted to user-friendly messages before being displayed to the user. Feel free to ignore if your specific case is different from these.
Author
Owner

@fxzer commented on GitHub (Jan 27, 2026):

Image

me too

@fxzer commented on GitHub (Jan 27, 2026): <img width="1263" height="882" alt="Image" src="https://github.com/user-attachments/assets/ef4be1ff-85fa-4dda-be17-7228d459ec45" /> me too
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7601