dangerous_requests_configTier 1 · 70% confidence

security-dangerous-requests-c-when-using-create-openapi-agent-from-langchain-com-c108561e

agent: security

When does this happen?

IF When using `create_openapi_agent` from langchain_community.agent_toolkits.openapi, attempting to set `allow_dangerous_requests=True` has no effect, causing a ValueError because the parameter is not forwarded to the underlying `RequestsGetToolWithParsing` and `RequestsPostToolWithParsing` tools.

How others solved it

THEN Add `allow_dangerous_requests=True` to the `create_openapi_agent` function call. Alternatively, if modifying the source, ensure that the `allow_dangerous_requests` parameter is passed from `create_openapi_agent` into the `_create_api_controller_agent` helper and then to the tool constructors. The fix propagates the security flag so that dangerous requests are explicitly acknowledged.

planner.create_openapi_agent(
    allow_dangerous_requests=True,
    spec,
    requests_wrapper,
    llm,
    agent_executor_kwargs={"handle_parsing_errors": "..."}
)

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics