Skip to content

feat(task): allow model parameter in task() #29984

Description

@samba-solo

Problem

task() inherits the parent model. Cannot use a cheap model (Qwen3-4B) for INVESTIGADOR while the parent uses DeepSeek V4.

Proposed API

task({
  subagent_type: "investigador",
  prompt: "...",
  model: "qwen3-4b"   // optional, overrides parent model
})

Implementation notes

From packages/opencode/src/tool/task.ts:

  • BaseParameterFields has: description, prompt, subagent_type, task_id, command — no model parameter
  • Model is currently derived from next.model ?? { modelID: msg.info.modelID, providerID: msg.info.providerID }
  • Adding an optional model string parameter that overrides this derivation would enable the use case

References

  • AGENTS.md §Router de documentación → Activar INVESTIGADOR
  • ~/.config/opencode/agents/investigador.md

Activity

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

Metadata

Metadata

Assignees

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