Skip to content

[FEATURE]: Support custom system prompt per model in config #18177

@mjdouglas

Description

@mjdouglas

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

There are earlier issues, but they don't follow the template and seem dead.

Describe the enhancement you want to request

When configuring custom models via opencode.json, there's no way to specify a model-specific system prompt. The default behavior matches model IDs to built-in prompts (claude, gemini, gpt, etc.), but unknown models fall back to a generic prompt with no way to customize it.

The existing agent-level prompt field isn't sufficient here because agents and models are orthogonal concepts. A single model can be used across multiple agents, and a single agent can be switched between models. The system prompt should follow the model, not the agent — for example, a custom model may need specific formatting instructions or persona regardless of which agent uses it.

A prompt field on the model config would let users define a system prompt tailored to their model.

Metadata

Metadata

Assignees

Labels

No labels
No labels

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