Skip to content

The models command with the --standalone flag shows no models and exits with the code 0 #41071

Closed

Description

@Majidalee1

Description

The models command has a --standalone flag. The help text says that this flag starts a private server in place of the background service.

The command with this flag shows no models. The command writes no data to stdout. The command writes no data to stderr. The command exits with the code 0.

The same command without the flag shows 455 models.

The fault occurs for all providers. The fault occurs for the default providers and also for the custom providers.

The user gets no error message. Thus the user cannot see the cause of the fault.

Environment

  • opencode version: 0.0.0-next-16974 (next channel)
  • Operating system: macOS 25.5.0
  • Architecture: arm64
  • Installation method: npm

How to repeat the fault

  1. Install opencode from the next channel.
  2. Make sure that a minimum of one provider is available.
  3. Run this command: opencode models
  4. Count the lines of the output.
  5. Run this command: opencode models --standalone
  6. Count the lines of the output.

Result

Step 3 shows 455 models.

Step 5 shows 0 models. The exit code is 0. There is no error message.

$ opencode models | wc -l
     455

$ opencode models --standalone | wc -l
       0

$ opencode models --standalone 2>/dev/null; echo "exit=$?"
exit=0

$ opencode models --standalone 2>&1 >/dev/null
(no output)

Expected result

The command with the --standalone flag must show the same models as the command without the flag.

If the private server does not start, the command must show an error message. The command must then exit with a code that is not 0.

Additional data

The models command also has a --server flag. I did not test this flag.

Activity

  1. opencode-agent commented on Aug 11, 2026

    @opencode-agent
    Contributor

    Addressed by #41783. The server’s first model.list call now waits on the bounded plugin/catalog readiness barrier before reading models, so a cold standalone server cannot return HTTP 200 with an empty intermediate catalog. The regression starts a fresh server with a custom model, immediately requests /api/model, and verifies the model is present; timeout uses the existing explicit service-unavailable error. Closing as resolved on the v2 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions