Skip to content

Configure Opencode Models writes invalid model ID prefix (opencode/ instead of openrouter/) #260

@adelosrc

Description

@adelosrc

Pre-flight Checklist

  • I have searched existing issues and this is not a duplicate
  • I understand that PRs will be rejected if the linked issue does not have status:approved

📝 Bug Description

Description

When configuring models via the TUI (Configure Models → Configure Opencode Models),
gentle-ai saves model IDs with the prefix "opencode/" instead of "openrouter/".

🔄 Steps to Reproduce

  1. Steps to reproduce

  2. Run gentle-ai
  3. Go to Configure Models → Configure Opencode Models
  4. Assign a model from OpenRouter (e.g. Qwen3.6 Plus Free) to all SDD phases
  5. Open opencode.json and check the model field

✅ Expected Behavior

Expected

"model": "openrouter/qwen/qwen3.6-plus:free"

❌ Actual Behavior

Actual

"model": "opencode/qwen3.6-plus-free"

Gentle AI Version

gga v2.8.1

Operating System

macOS

AI Agent / Client

OpenCode

📋 Affected Area

Agent Detection

💡 Logs / Error Output

## Result
OpenCode CLI rejects the model:
"Agent gentleman's configured model opencode/qwen3.6-plus-free is not valid"
and falls back to a default model (MiniMax 2.5 free).

Additional Context

Workaround

Manually edit opencode.json replacing opencode/ with the correct openrouter/ prefix and slug.

Environment

  • gentle-ai: 1.18.3
  • OpenCode: 1.4.0
  • macOS (Mac Mini M4)

Additional finding

The model list shown in gentle-ai's TUI is not synchronized with the models
that OpenCode actually supports at runtime.

Example:

  • "Qwen3.6 Plus Free" appears under "OpenCode Zen" in gentle-ai
  • But OpenCode CLI rejects it as invalid
  • The same model exists and works under OpenRouter: openrouter/qwen/qwen3.6-plus:free

This means the issue has two layers:

  1. Wrong prefix written to opencode.json (opencode/ instead of openrouter/)
  2. Stale/mismatched model catalog in gentle-ai's TUI vs OpenCode's actual available models

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstatus:approvedApproved for implementation — PRs can now be opened

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions