Skip to content

Claude (OAuth) provider: every request fails with 400 "parallel_tool_calls: Extra inputs are not permitted" (AnthropicClient sends an OpenAI-only field) #17

Description

@tomatantan

Environment

  • dGEN1, ethOS build S8921.HCS.EthOS.8+256.Global.15.0.Neutral.V04.20260327, AndyClaw versionName=61
  • AI PROVIDER = Claude (OAuth) (token from claude setup-token), MODEL = CLAUDE_OAUTH_OPUS_4_6 (same with SONNET_4_6)

Symptom

Every chat request fails immediately (LED error blink, no reply). logcat:

AgentLoop: BudgetMode | preset=Balanced (stock_balanced), active=[dynamicMaxTokens, concisePrompt, parallelToolCalls, noPreambleToolCalls, toolResultTruncation(3000)]
AnthropicClient.streamMessage: HTTP 400, errorBody={"type":"error","error":{"type":"invalid_request_error","message":"parallel_tool_calls: Extra inputs are not permitted"}}
ChatViewModel: LLM request failed: Anthropic API error (400) ...

Cause (main)

app/src/main/java/org/ethereumphone/andyclaw/llm/AnthropicClient.kt line ~230:

put("parallel_tool_calls", kotlinx.serialization.json.JsonPrimitive(request.parallelToolCalls))

parallel_tool_calls is an OpenAI Chat Completions parameter; the Anthropic Messages API has no such field and rejects unknown top-level fields with 400. The default budget preset stock_balanced (agent/BudgetPreset.kt) sets parallelToolCalls = true, so the field is always sent on the Anthropic path. Build 61 has no Budget Mode UI, so users cannot switch presets to work around it.

Suggested fix

Do not emit parallel_tool_calls in AnthropicClient. Anthropic runs tool calls in parallel by default; if a preset wants to disable parallel tool use, map it to tool_choice: {"type": "auto", "disable_parallel_tool_use": true} instead. Minimal patch: remove the put(...) line (or gate it on OpenAI-compatible providers only).

Also observed (separate)

Executive-summary calls on the same OAuth token returned 429 rate_limit_error — account-level, unrelated to the 400.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions