Skip to content
This repository was archived by the owner on May 16, 2025. It is now read-only.
This repository was archived by the owner on May 16, 2025. It is now read-only.

I encountered an Error: 400 status code (no body) when using the creatReactAgent method #51

Closed as not planned
@loverara

Description

@loverara

library version

"langchain": "^0.3.19",
"@langchain/community": "^0.3.32",
"@langchain/core": "^0.3.40",
"@langchain/langgraph": "^0.2.49",
"@langchain/mcp-adapters": "^0.3.3",
"@langchain/openai": "^0.4.4"

The tools used are from the MCP server converted by @ langchain/mcp adapters

error messages
[NEST] 2025-03-31 16:26:46 error [AIFaucet.rootOutput] Error: 400 status code (no body) at Function.generate (/Users/loverara/Documents/code_workspace/vscode_workspace/ifuncun/agent_template/node_modules/openai/src/error.ts:72:14) at OpenAI.makeStatusError (/Users/loverara/Documents/code_workspace/vscode_workspace/ifuncun/agent_template/node_modules/openai/src/core.ts:443:21) at OpenAI.makeRequest (/Users/loverara/Documents/code_workspace/vscode_workspace/ifuncun/agent_template/node_modules/openai/src/core.ts:507:24) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async /Users/loverara/Documents/code_workspace/vscode_workspace/ifuncun/agent_template/node_modules/@langchain/openai/dist/chat_models.cjs:1528:29

The error message I received when debugging to method completionWithRetry is
'{"object":"error","message":"\\"auto\\" tool choice requires --enable-auto-tool-choice and --tool-call-parser to be set","type":"BadRequestError","param":null,"code":400}'

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