Add opencode model variant customization - #739
Conversation
|
Thanks for the PR! I'm wondering if you'd be keen to steer the PR towards a more generic mechanism? Instead of adding (defcustom agent-shell-opencode-default-config-options
'(("model" . "anthropic/claude-opus-4-5")
("thought_level" . "high")
("mode" . "plan"))
"Default OpenCode config options, applied at session start.
Keys are config-option categories advertised by the agent; see
the \"Available config options\" section in your shell."
:type '(alist :key-type string :value-type string))I know we haven't done this before in project, but it would enable us to set precedence for moving towards a more scalable mechanism for users to set whatever option is supported by their agent without requiring additional agent-shell changes. To support this path, I've just submitted 95c700a which enables users to know exactly what is and isn't supported by their agents.
|
cab379d to
e2c31cf
Compare
Sounds good to me. I will also mark the old |

Opencode does not currently support setting a persistent model variant via the opencode config json - or at least it does not work when running via acp. So this PR adds:
default-thought-level-idviaagent-shell-make-agent-configagent-shell-opencode-default-model-variantdefcustomNote: if the variant is not supported by the current model, then the user will see an error when loading the session
Checklist
M-x checkdocandM-x byte-compile-file.