opencode icon indicating copy to clipboard operation
opencode copied to clipboard

fix(command): validate model before executing slash command

Open devxoul opened this issue 1 month ago • 1 comments

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

devxoul avatar Dec 18 '25 13:12 devxoul

/review

rekram1-node avatar Dec 18 '25 13:12 rekram1-node

lgtm

github-actions[bot] avatar Dec 18 '25 14:12 github-actions[bot]