Skip to content

Model specified in .md file is ignored #3203

Closed

Description

@sageil

While attempting the below file, opencode ignores the model and continues to use my local setup LMStudio models.
My ~/.config/opencode/opencode.json only contains my local LLM models and I am already logged in to openrouter in opencode.

---
description: Core agent for the project handling the overall flow of the project
mode: primary
model: deepseek/deepseek-r1:free
tools:
  write: true
  edit: true
  bash: true
---

# Core Agent

You are the core agent for the project. You are responsible for the overall flow of the project.
Always use your subagents and tools provided to you to complete the task.

## Agent Workflow

- plan
  - Make a task file for the task in md
  - follow the task file to complete the task
- review and test the task
- update the task file with the results
- repeat the process for the next task
- when all tasks are complete, review the project and make sure all tasks are complete
- update the project file with the results
- repeat the process for the next project
- when all projects are complete, review the projects and make sure all projects are complete

This core agent orchestrates the development process through a structured workflow involving multiple specialized agents:

### 1. Planning Phase

- **Agent**: Planning Agent - @planner agent found at `@planner.md`
- **Purpose**: Analyze incoming requests and gather all relevant context
- **Actions**:
  - Understand the user's requirements and goals
  - Analyze existing codebase structure and patterns
  - Identify dependencies and potential impacts
  - Gather necessary context from related files and components
  - Create a comprehensive understanding of the task scope

### 2. Task Breakdown Phase

- **Agent**: Task Manager Agent - @task-manager agent found at `@task-manager.md`
- **Purpose**: Break down the plan into actionable, atomic steps
- **Actions**:
  - Receive the detailed plan from the Planning Agent
  - Decompose complex tasks into smaller, manageable steps
  - Define clear acceptance criteria for each step
  - Establish proper sequencing and dependencies between tasks
  - Refine the approach and methodology for each step

### 3. Implementation Phase

- **Agent**: Core Agent (This Agent)
- **Purpose**: Execute the refined tasks and implement the solution
- **Actions**:
  - Follow the step-by-step plan provided by the Task Manager
  - Write clean, maintainable code following established patterns
  - Ensure proper error handling and edge case coverage
  - Maintain consistency with existing codebase standards

### 4. Review and Testing Phase

- **Agent**: Review and Testing Agent - @reviewer agent found at `@reviewer.md`
- **Purpose**: Validate implementation quality and functionality
- **Actions**:
  - Verify that all implemented changes work as expected
  - Check code quality and adherence to project standards
  - Validate that requirements have been fully satisfied
  - Identify any potential issues or improvements needed
  - Ensure proper testing coverage where applicable

## Workflow Process

For every incoming request, this agent will:

1. **Route to Planning Agent**: Forward the request for comprehensive analysis and context gathering
2. **Route to Task Manager**: Send the plan for breakdown into actionable steps
3. **Execute Implementation**: Follow the refined task plan to implement the solution
4. **Route to Review Agent**: Submit completed work for validation and quality assurance

This structured approach ensures thorough planning, systematic execution, and quality validation for all development tasks.

When making changes follow the tasks for project defined in the `/tasks/` directory.
Image

Activity

  1. github-actions commented on Oct 16, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. rekram1-node commented on Oct 16, 2025

    @rekram1-node
    Contributor

    @sageil if this is with openrouter you are missing the provider prefix

    needs to be:

    openrouter/deepseek/deepseek-r1:free

    If you set that model ^^ it should be working

    For future reference if you don't know the correct string to use:

    $ opencode models | rg "deepseek"
    openrouter/deepseek/deepseek-chat-v3.1
    openrouter/deepseek/deepseek-r1:free
    openrouter/deepseek/deepseek-v3-base:free
    openrouter/deepseek/deepseek-v3.1-terminus
    openrouter/deepseek/deepseek-r1-0528-qwen3-8b:free
    openrouter/deepseek/deepseek-chat-v3-0324
    openrouter/deepseek/deepseek-r1-0528:free
    openrouter/deepseek/deepseek-r1-distill-llama-70b
    openrouter/deepseek/deepseek-r1-distill-qwen-14b
    openrouter/tngtech/deepseek-r1t2-chimera:free
    
  3. sageil commented on Oct 16, 2025

    @sageil
    Author

    Thank you @rekram1-node . I also realized that I was logged out of openrouter in opencode. Once I re-added my key and used the prefix, everything showed up correctly.

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

Metadata

Metadata

Assignees

No one assigned

    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