Skip to content

agentctl launch opencode strips 'openai/' prefix from --model flag #170

Open

Description

@doink-kindo

Bug

agentctl launch opencode --model 'openai/gpt-5.4' generates a wrapper script that passes --model 'gpt-5.4' (without the openai/ provider prefix) to opencode run. OpenCode then fails with:

ProviderModelNotFoundError: Model not found: gpt-5.4/.
  data: { providerID: "gpt-5.4", modelID: "", suggestions: [] }

OpenCode requires the fully-qualified provider/model format (e.g. openai/gpt-5.4). The stripping silently breaks all launches.

Evidence

Working wrapper (launched ~10 min earlier, same agentctl version):

/opt/homebrew/bin/opencode 'run' '--model' 'openai/gpt-5.4' -- '...'

Broken wrapper (my launch):

/opt/homebrew/bin/opencode 'run' '--model' 'gpt-5.4' -- '...'

Both used agentctl 1.9.1. Both specified --model 'openai/gpt-5.4'. The broken sessions consistently die after ~30-37 seconds (OpenCode init + provider discovery + crash).

Reproduction

agentctl launch opencode --model 'openai/gpt-5.4' --cwd /tmp -p 'say hello'
# Check wrapper: cat ~/.agentctl/opencode-sessions/wrapper-<id>.sh
# Model will be 'gpt-5.4' instead of 'openai/gpt-5.4'

Impact

All three autonomous PRs (#10175, #10179, #10181) had 8-10+ failed polish-loop attempts due to this bug. Workaround: bypass agentctl and run opencode run directly.

Environment

  • agentctl: 1.9.1
  • opencode: 1.2.11
  • macOS arm64

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions