Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions home-manager/modules/opencode/opencode.jsonc
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
{
"$schema": "https://opencode.ai/config.json",
"theme": "opencode",
"model": "kimi-k2",
"model": "grok-code",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The default model has been changed to grok-code. However, this model is not explicitly defined under any of the configured providers (lmstudio, ollama, openai, openrouter). This reliance on implicit model resolution can make the configuration fragile. If the tool fails to find a provider for grok-code, it could lead to a runtime failure. It would be more robust to explicitly define this model under its provider, for instance, in the openrouter.models section if it's an OpenRouter model.

"small_model": "kimi-k2",
Comment on lines +4 to +5

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Unmapped default model will break requests

The new default "model": "grok-code" is not declared under any provider block (lmstudio/ollama/openai/openrouter). With no matching provider config, OpenCode will fail resolving the default model and requests will error out. Either restore the previous default or add the corresponding provider/model mapping (e.g., via openrouter) before landing this change.

"autoupdate": true,
"agent": {
"code-reviewer": {
"description": "Reviews code for best practices and potential issues",
"model": "anthropic/claude-sonnet-4-20250514",
"prompt": "You are a code reviewer. Focus on security, performance, and maintainability.",
"tools": {
// Disable file modification tools for review-only agent
"write": false,
"edit": false
}
}
Comment on lines +8 to +17

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The model anthropic/claude-sonnet-4-20250514 is specified for the new code-reviewer agent without an explicit provider. This could lead to resolution issues if the tool cannot automatically determine which provider to use. To make the configuration more robust and self-documenting, I suggest explicitly defining the provider for this agent's model. Assuming openrouter is the intended provider, you could add a provider key.

    "code-reviewer": {
      "description": "Reviews code for best practices and potential issues",
      "model": "anthropic/claude-sonnet-4-20250514",
      "provider": "openrouter",
      "prompt": "You are a code reviewer. Focus on security, performance, and maintainability.",
      "tools": {
        // Disable file modification tools for review-only agent
        "write": false,
        "edit": false
      }
    }

},
"provider": {
"lmstudio": {
"npm": "@ai-sdk/openai-compatible",
Expand Down Expand Up @@ -139,5 +152,8 @@
}
}
},
"plugin": ["opencode-openai-codex-auth"]
"plugin": ["opencode-openai-codex-auth"],
"tui": {
"scroll_speed": 3
}
}