Skip to content

Bug: Should use only free models when no providers configured #1883

@cloudwaddie-agent

Description

@cloudwaddie-agent

Bug Description

When oh-my-opencode is installed/configured and the user selects no providers, subagents should ONLY use free models. Currently, they incorrectly inherit or use a paid model (glm-4.7) instead of defaulting to free models only.

Expected Behavior

When no providers are configured:

  • Subagents should use ONLY free models (e.g., opencode/big-pickle, opencode/kimi-k2.5-free, opencode/minimax-m2.5-free)
  • Should NOT inherit the parent model's configuration
  • Should default to free models since no paid providers were set up

Actual Behavior

  • User configures: no providers selected (free models only)
  • Main agent may work correctly with a free model
  • Subagent (child agent) uses glm-4.7 (a paid model), causing errors since GLM 4.7 is no longer free
  • Subagent should instead use only free models when no providers are configured

Steps to Reproduce

  1. Configure oh-my-opencode with no providers (free models only)
  2. Set the main model to a free model like opencode/kimi-k2.5-free
  3. Spawn a subagent (task with category or subagent_type)
  4. Observe that the subagent attempts to use glm-4.7 instead of a free model

Environment

  • oh-my-opencode version: latest
  • Configuration: No providers selected (free models only)

Additional Context

Reported in: CloudWaddie/actions-agent#67

The fix should ensure that when no providers are configured, the system defaults to using ONLY free models, rather than inheriting any parent model configuration or falling back to a paid model.

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage:bugConfirmed bug with repro steps

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions