Skip to content

Error returns exit code 0 #17854

Description

@mausch

Description

$ opencode --model openrouter/hunter-alpha run "hello"
ProviderModelNotFoundError: ProviderModelNotFoundError
 data: {
  providerID: "openrouter",
  modelID: "hunter-alpha",
  suggestions: [ "openrouter/hunter-alpha" ],
},

      at getModel (/$bunfs/root/src/index.js:185999:15)

Error: Model not found: openrouter/hunter-alpha. Did you mean: openrouter/hunter-alpha?

This is clearly an error but the exit code is 0 which complicates scripting.

Plugins

No response

OpenCode version

1.2.27

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions