mirror of
https://github.com/wu736139669/hapi.git
synced 2026-11-27 05:41:23 +00:00
feat: add codex reasoning effort option (#297)
This commit is contained in:
@@ -64,6 +64,22 @@ describe('appServerConfig', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('passes model reasoning effort via thread config', () => {
|
||||
const params = buildThreadStartParams({
|
||||
mode: { permissionMode: 'default', modelReasoningEffort: 'xhigh', collaborationMode: 'default' },
|
||||
mcpServers
|
||||
});
|
||||
|
||||
expect(params.config).toEqual({
|
||||
'mcp_servers.hapi': {
|
||||
command: 'node',
|
||||
args: ['mcp']
|
||||
},
|
||||
developer_instructions: codexSystemPrompt,
|
||||
model_reasoning_effort: 'xhigh'
|
||||
});
|
||||
});
|
||||
|
||||
it('builds turn params with mode defaults', () => {
|
||||
const params = buildTurnStartParams({
|
||||
threadId: 'thread-1',
|
||||
|
||||
@@ -84,7 +84,8 @@ export function buildThreadStartParams(args: {
|
||||
} = resolveInstructions(args);
|
||||
const configWithInstructions = {
|
||||
...config,
|
||||
developer_instructions: resolvedDeveloperInstructions
|
||||
developer_instructions: resolvedDeveloperInstructions,
|
||||
...(args.mode.modelReasoningEffort ? { model_reasoning_effort: args.mode.modelReasoningEffort } : {})
|
||||
};
|
||||
|
||||
const params: ThreadStartParams = {
|
||||
|
||||
Reference in New Issue
Block a user