Add OmO agent model fallback chain to inherit OpenCode system default (#79)

- Add systemDefaultModel parameter to createBuiltinAgents() function
- Implement model fallback priority chain for OmO agent:
  1. oh-my-opencode.json agents.OmO.model (explicit override)
  2. OpenCode system config.model (system default)
  3. Hardcoded default in omoAgent (fallback)
- Pass config.model from OpenCode settings to createBuiltinAgents()

This fixes issue #79 where users couldn't change agent models via OpenCode config.

🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
YeonGyu-Kim
2025-12-17 18:27:24 +09:00
parent e144dd54a7
commit c6595bee3e
2 changed files with 15 additions and 1 deletions

View File

@@ -294,6 +294,7 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
pluginConfig.disabled_agents,
pluginConfig.agents,
ctx.directory,
config.model,
);
const userAgents = (pluginConfig.claude_code?.agents ?? true) ? loadUserAgents() : {};