fix(opencode): inherit user-selected models

This commit is contained in:
dajiaohuang
2026-08-24 20:09:12 -04:00
committed by haelyra
parent 4caab329db
commit 894f85350b
4 changed files with 20 additions and 33 deletions
+13
View File
@@ -28,6 +28,19 @@ const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
let passed = 0;
let failed = 0;
if (
test('model selection inherits the user configured OpenCode provider', () => {
assert.ok(!Object.hasOwn(config, 'model'), 'Root config must not pin a provider-specific model');
assert.ok(!Object.hasOwn(config, 'small_model'), 'Root config must not pin a provider-specific small model');
for (const [agentId, agent] of Object.entries(config.agent || {})) {
assert.ok(!Object.hasOwn(agent, 'model'), `Agent "${agentId}" must inherit the selected OpenCode model`);
}
})
)
passed++;
else failed++;
if (
test('plugin paths do not duplicate the .opencode directory', () => {
const plugins = config.plugin || [];