[PR #5740] fix(command): validate model before executing slash command #11557

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

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

State: closed
Merged: Yes


Background

Slash commands with invalid model fails silently. It will be great if we can display the error message.

For example:

~/.config/opencode/command/hello.md

---
description: Greet the user warmly
model: anthropic/claude-haiku
---

You are a friendly assistant who greets the user warmly. Greet the user warmly and cheerfully.

Summary

  • Validate model existence before executing slash commands
  • Show friendly error message with fuzzy suggestions when model not found

Preview

Screenshot 2025-12-18 at 10 08 01 PM Screenshot 2025-12-18 at 10 08 06 PM
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/5740 **State:** closed **Merged:** Yes --- ## Background Slash commands with invalid model fails silently. It will be great if we can display the error message. For example: **~/.config/opencode/command/hello.md** ```md --- description: Greet the user warmly model: anthropic/claude-haiku --- You are a friendly assistant who greets the user warmly. Greet the user warmly and cheerfully. ``` ## Summary - Validate model existence before executing slash commands - Show friendly error message with fuzzy suggestions when model not found ## Preview <img width="566" height="163" alt="Screenshot 2025-12-18 at 10 08 01 PM" src="https://github.com/user-attachments/assets/b664d555-be08-47cd-a47e-21184c0c8771" /> <img width="567" height="152" alt="Screenshot 2025-12-18 at 10 08 06 PM" src="https://github.com/user-attachments/assets/1fa93103-a304-4ab2-b149-f56a08a8cf17" />
yindo added the pull-request label 2026-02-16 18:16:24 -05:00
yindo closed this issue 2026-02-16 18:16:24 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11557