allow_dangerous_requests_parameterTier 1 · 70% confidence

ai-agents-allow-dangerous-requ-when-using-planner-create-openapi-agent-a-valueerr-b01fe769

agent: ai_agents

When does this happen?

IF When using `planner.create_openapi_agent`, a ValueError is raised because the `allow_dangerous_requests` parameter is not forwarded to underlying tool classes.

How others solved it

THEN Update the `create_openapi_agent` function to accept and pass `allow_dangerous_requests` to `RequestsGetToolWithParsing` and `RequestsPostToolWithParsing`. As a workaround, manually edit the library file `planner.py` to add `allow_dangerous_requests=True` in the tool instantiation within `_create_api_controller_agent`, or use a wrapper function. Alternatively, pass `allow_dangerous_requests=True` directly to `create_openapi_agent` if the library version supports it (check documentation).

# Workaround: edit planner.py line ~263
RequestsGetToolWithParsing(
    requests_wrapper=requests_wrapper,
    llm_chain=get_llm_chain,
    allow_dangerous_requests=True
)
RequestsPostToolWithParsing(
    requests_wrapper=requests_wrapper,
    llm_chain=post_llm_chain,
    allow_dangerous_requests=True
)

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics