feat: transport resolved reasoning effort
This commit is contained in:
@@ -208,8 +208,28 @@ describe('resolveModel', () => {
|
||||
const planner = (await resolveModel(['gsd-planner'], tmpDir)).data as Record<string, unknown>;
|
||||
const executor = (await resolveModel(['gsd-executor'], tmpDir)).data as Record<string, unknown>;
|
||||
|
||||
expect(planner).toMatchObject({ model: 'gpt-5.5', profile: 'balanced' });
|
||||
expect(executor).toMatchObject({ model: 'gpt-5.3-codex', profile: 'balanced' });
|
||||
expect(planner).toMatchObject({ model: 'gpt-5.5', profile: 'balanced', reasoning_effort: 'high' });
|
||||
expect(executor).toMatchObject({ model: 'gpt-5.3-codex', profile: 'balanced', reasoning_effort: 'medium' });
|
||||
});
|
||||
|
||||
it('returns runtime reasoning_effort from the same phase-tier source as model', async () => {
|
||||
const { resolveModel } = await import('./config-query.js');
|
||||
await writeFile(
|
||||
join(tmpDir, '.planning', 'config.json'),
|
||||
JSON.stringify({
|
||||
model_profile: 'budget',
|
||||
runtime: 'codex',
|
||||
models: { execution: 'opus' },
|
||||
}),
|
||||
);
|
||||
|
||||
const executor = (await resolveModel(['gsd-executor'], tmpDir)).data as Record<string, unknown>;
|
||||
|
||||
expect(executor).toMatchObject({
|
||||
model: 'gpt-5.4',
|
||||
profile: 'budget',
|
||||
reasoning_effort: 'xhigh',
|
||||
});
|
||||
});
|
||||
|
||||
it('resolveModel uses workstream config when --ws is specified', async () => {
|
||||
|
||||
@@ -222,7 +222,11 @@ export const resolveModel: QueryHandler = async (args, projectDir, workstream) =
|
||||
const tier = typeof phaseTier === 'string' ? phaseTier : alias;
|
||||
const runtimeTier = resolveRuntimeTier(config as Record<string, unknown>, tier);
|
||||
if (runtimeTier?.model) {
|
||||
return { data: { model: runtimeTier.model, profile } };
|
||||
const result: Record<string, unknown> = { model: runtimeTier.model, profile };
|
||||
if (runtimeTier.reasoning_effort) {
|
||||
result.reasoning_effort = runtimeTier.reasoning_effort;
|
||||
}
|
||||
return { data: result };
|
||||
}
|
||||
|
||||
if (resolveModelIds === 'omit') {
|
||||
|
||||
Reference in New Issue
Block a user