fix: Patch headless mode GPT-5 (#88)

Co-authored-by: cpacker <packercharles@gmail.com>
This commit is contained in:
Kevin Lin
2025-11-16 20:48:50 -08:00
committed by GitHub
parent 8df4c08510
commit 754db3b273
8 changed files with 75 additions and 46 deletions

View File

@@ -224,7 +224,9 @@ export async function createAgent(
// 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) {
const { context_window, ...otherArgs } = updateArgs;
// Remove context_window if present; already set during create
const otherArgs = { ...updateArgs } as Record<string, unknown>;
delete (otherArgs as Record<string, unknown>).context_window;
if (Object.keys(otherArgs).length > 0) {
await updateAgentLLMConfig(
agent.id,