Add model: provider/model-id to agent.md
#136
Open
+115
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Perfect! Here's a complete summary of how to configure models for each agent and subagent:
Complete Process for Model Configuration
1. Edit the Agent File
Navigate to your agent's markdown file and add the
modelparameter to the YAML frontmatter:2. Choose the Right Model
Visit https://models.dev/?search=open to find available models and their IDs. Popular choices:
anthropic/claude-sonnet-4-20250514anthropic/claude-haiku-3-20241022openai/gpt-4ooropenai/gpt-4o-minimeta-llama/llama-3.3-70b-instruct3. Agent File Locations
Global agents (all projects):
~/.config/opencode/agents/Project-specific agents (current project):
.opencode/agents/4. Example I Created
I've created
example-agent-configs.mdin this repository showing different model configurations for various agent types, and I've updated the existing reviewer agent to use Claude Sonnet 4 for high-quality code reviews.5. Key Points
The configuration is now ready! Each time you use an agent, it will use the model specified in its configuration file instead of your default model.
Closes #135
opencode session | github run