From fd776bfc2047c26971e0efc6a66d9001feb610e8 Mon Sep 17 00:00:00 2001 From: oqyude Date: Mon, 26 Oct 2026 16:09:42 +0300 Subject: [PATCH] chore(opencode): default model -> opencode-go/deepseek-v4.1-flash The MINIMAX Token Plan keeps its own ceiling, invisible to the director's quota probe: on 2026-10-26 every sub-agent died on spawn with "Token Plan usage limit reached (2056)" while the probe for the same provider reported decision=ok. The director already mints its worker sessions on opencode-go/deepseek-v4.1-flash (state/quota.json provider_selection), so this makes agents, workers and the gate share one provider and one budget. modelFast drives all five slim agents and the global default model, so the whole set moves together. Build-verified: nixos-rebuild build --flake .#sapphira -> rc=0. Not activated: switch restarts opencode-web, where the sessions doing the deploy live. --- home/modules/opencode.nix | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/home/modules/opencode.nix b/home/modules/opencode.nix index a0bea49..9776a1d 100644 --- a/home/modules/opencode.nix +++ b/home/modules/opencode.nix @@ -74,17 +74,26 @@ let pluginSpec = "oh-my-opencode-slim@3.0.5"; # Model ids are validated against the provider registry, not against taste. - # `opencode models` on BOTH the workstation and sapphira lists exactly: - # minimax-coding-plan/MiniMax-M3 variants: none, thinking - # minimax-coding-plan/MiniMax-M3.1-Flash variants: (none) - # opencode/big-pickle variants: (none) - # opencode/minimax-m3.1-flash-free variants: low..max - # Anything else (MiniMax-M3.1-Flash-Preview, MiniMax-M2.7-highspeed, ...) - # is NOT in the registry -> ProviderModelNotFoundError. The retired v1 - # plugin config on this host referenced MiniMax-M3.1-Flash-Preview - # everywhere; that is the same class of bug as the kimi-for-coding - # incident described in R1.x. - modelFast = "minimax-coding-plan/MiniMax-M3.1-Flash"; + # `opencode models` on this host lists the opencode-go registry, which is the + # account the director already spends from: state/quota.json + # `provider_selection.model` = opencode-go/deepseek-v4.1-flash, and every + # worker session the director mints is created with exactly that pair. Using + # the same provider for the agents makes the director's quota gate guard the + # model the agents actually run, instead of a second, invisible budget. + # + # 2026-10-26: default model moved + # minimax-coding-plan/MiniMax-M3.1-Flash -> opencode-go/deepseek-v4.1-flash + # Reason: the MINIMAX *Token Plan* keeps its own limit, separate from the + # director's quota probe, and it was exhausted mid-run — every sub-agent + # (explorer/oracle/fixer/designer) died within a second of being spawned with + # "Token Plan usage limit reached (2056)" while the director's probe reported + # decision=ok for the same provider. One provider = one budget = one gate. + # + # Anything absent from the registry is a ProviderModelNotFoundError + # (MiniMax-M3.1-Flash-Preview, MiniMax-M2.7-highspeed, ... — the retired v1 + # plugin config referenced the -Preview id everywhere; same class of bug as + # the kimi-for-coding incident described in R1.x). + modelFast = "opencode-go/deepseek-v4.1-flash"; # nixpkgs ast-grep only ships binary `ast-grep`; omo's ast-grep skill probes # for `sg` (or ast-grep). Provide both via a symlink wrapper.