fix: parallel tool calling misc fixes (#85)

This commit is contained in:
Charles Packer
2025-11-08 12:36:52 -08:00
committed by GitHub
parent eab04aaee3
commit c234ea2b54
4 changed files with 123 additions and 94 deletions

View File

@@ -220,9 +220,18 @@ export async function createAgent(
enable_sleeptime: enableSleeptime,
});
// Apply updateArgs if provided (e.g., reasoningEffort, contextWindow, etc.)
// Apply updateArgs if provided (e.g., reasoningEffort, verbosity, etc.)
// Skip if updateArgs only contains context_window (already set in create)
if (updateArgs && Object.keys(updateArgs).length > 0) {
await updateAgentLLMConfig(agent.id, modelHandle, updateArgs);
const { context_window, ...otherArgs } = updateArgs;
if (Object.keys(otherArgs).length > 0) {
await updateAgentLLMConfig(
agent.id,
modelHandle,
otherArgs,
true, // preserve parallel_tool_calls
);
}
}
// Always retrieve the agent to ensure we get the full state with populated memory blocks