feat: transport resolved reasoning effort

This commit is contained in:
radioflyer28
2026-05-13 18:26:54 -04:00
parent 6ea25ec8c7
commit f70829d067
6 changed files with 51 additions and 4 deletions

View File

@@ -133,6 +133,8 @@ describe('getCodexSkillAdapterHeader', () => {
const result = getCodexSkillAdapterHeader('gsd-execute-phase');
assert.ok(result.includes('spawn_agent'), 'maps to spawn_agent');
assert.ok(result.includes('agent_type'), 'maps subagent_type to agent_type');
assert.ok(result.includes('reasoning_effort'), 'documents reasoning_effort transport');
assert.ok(result.includes('do not invent one-off effort literals'), 'keeps effort policy centralized');
assert.ok(result.includes('fork_context'), 'documents fork_context default');
assert.ok(result.includes('wait(ids)'), 'documents parallel wait pattern');
assert.ok(result.includes('close_agent'), 'documents close_agent cleanup');

View File

@@ -1117,6 +1117,21 @@ describe('resolve-model command', () => {
assert.ok(output.model, 'should resolve a model');
});
test('includes reasoning_effort when selected runtime supports it', () => {
fs.writeFileSync(path.join(tmpDir, '.planning', 'config.json'), JSON.stringify({
model_profile: 'balanced',
runtime: 'codex',
models: { planning: 'opus' },
}));
const result = runGsdTools('resolve-model gsd-planner', tmpDir);
assert.ok(result.success, `Command failed: ${result.error}`);
const output = JSON.parse(result.output);
assert.strictEqual(output.model, 'gpt-5.4');
assert.strictEqual(output.profile, 'balanced');
assert.strictEqual(output.reasoning_effort, 'xhigh');
});
test('fails when no agent-type provided', () => {
const result = runGsdTools('resolve-model', tmpDir);
assert.ok(!result.success, 'should fail without agent-type');