From a66c716c0a43cb0f7952932be44eb19cb42e2cfc Mon Sep 17 00:00:00 2001 From: kiserufetch <38003008+kiserufetch@users.noreply.github.com> Date: Mon, 2 Nov 2026 09:05:03 +0300 Subject: [PATCH] fix(tools): drop empty required entry from list_task_credentials schema list_task_credentials takes no parameters but built its JSON Schema with obj(map[string]any{}, ""), emitting {"type":"object","required":[""], "properties":{}}. The required array contains an empty string, which strict function-call validators reject. Observed with DeepSeek through an OpenAI-compatible gateway (format "openai"): openai: status 400 invalid_tool_spec - "function.parameters.required must be an array of non-empty strings" Because the tool is in the worker toolset, every worker run fails before the first tool call (terminal state model_error); the planner and main agent are unaffected since they don't load it. Anthropic/OpenAI accept the malformed schema silently, so it only surfaces on stricter providers. Pass no required args so obj omits the required key entirely: {"type":"object","properties":{}}. Co-Authored-By: Claude Opus 4.8 --- agent/tools_creds.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/tools_creds.go b/agent/tools_creds.go index b8f4cd5..5b07df1 100644 --- a/agent/tools_creds.go +++ b/agent/tools_creds.go @@ -64,7 +64,7 @@ func (t *ToolSet) listTaskCredentials() actool.CoreTool { return writeTool( "list_task_credentials", "List this task's test accounts: user-declared accounts (e.g. program-provided aliases; a user-declared entry with an empty password means: register an account on that domain with a strong password, then record it via save_task_credential) plus accounts recorded by earlier runs. Check this BEFORE registering a new account, and use matching entries for authenticated testing.", - obj(map[string]any{}, ""), + obj(map[string]any{}), func(_ context.Context, _ json.RawMessage) (actool.Result, error) { if t.ts == nil { return actool.Errorf("list_task_credentials is not enabled: task store is not initialized"), nil