Update opencode.nix: use OpenRouter model IDs, add Nitro routing, set compact agent mode to primary

This commit is contained in:
2026-04-10 17:30:25 +02:00
parent 6a99cc0846
commit 0c64eaef02
+26 -4
View File
@@ -3,11 +3,33 @@
{
xdg.configFile."opencode/opencode.json".text = builtins.toJSON {
"$schema" = "https://opencode.ai/config.json";
provider = {
openrouter = {
models = {
"openrouter/openai/gpt-oss-120b" = {
options = {
provider = {
order = [ "Nitro" ];
allow_fallbacks = true;
};
};
};
"openrouter/moonshotai/kimi-k2.5" = {
options = {
provider = {
order = [ "Nitro" ];
allow_fallbacks = true;
};
};
};
};
};
};
agent = {
commit = {
description = "Creates a one-line git commit describing the changes";
mode = "subagent";
model = "openai/gpt-oss-120b:nitro";
mode = "primary";
model = "openrouter/openai/gpt-oss-120b";
prompt = ''
You are a git commit agent. When invoked:
1. Run `git status` and `git diff` to understand all changes
@@ -25,8 +47,8 @@
};
compact = {
description = "Compacts and summarizes conversation context to reduce token usage";
mode = "subagent";
model = "moonshotai/kimi-k2.5:nitro";
mode = "primary";
model = "openrouter/openai/gpt-oss-120b";
prompt = ''
You are a context compaction specialist. Your job is to summarize and compress the conversation history while preserving:
1. Key decisions and their rationale