Skip to content

Tool usage returns BadRequestError: stop_details Extra Inputs are not permitted #333

@SteveMeli

Description

@SteveMeli

When creating a basic tool as a function using the anthropic provider, the tool is called but the response message to the API is malformed and raises an error.

I have tried with the example code from the agent docs and get the same outcome.

Versions

ActiveAgent 1.0.1
Anthropic 1.35.0

Expected outcome

Tool usage should be passed back to anthropic successfully

Actual output

The call raises an error after the tool is called

[ActiveAgent] [Anthropic] Prompt completed: model=xxxx messages=1 stream=false tokens=614/59 finish=tool_use 1591.8ms
Geocoding query: 1 High Street, London
 [ActiveAgent] [Anthropic] Tool call: geocode (0.2ms)
[ActiveAgent] [Anthropic] Prompt completed: messages= stream= 883.0ms
[ActiveAgent] [Anthropic] Prompt completed: messages= stream= 2481.7ms
5:in `<main>': {:url=>"https://api.anthropic.com/v1/messages", :status=>400, :body=>{:type=>"error", :error=>{:type=>"invalid_request_error", :message=>"messages.1.stop_details: Extra inputs are not permitted"}, :request_id=>"req_XXXX"}} (Anthropic::Errors::BadRequestError)

It seems that the tool response sent back to anthropic is malformed? Or contains the stop details from the tool response.

Many thanks
Stephen

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