AI directly returns the usage result of the tool #872

Closed
opened 2026-02-20 17:42:11 -05:00 by yindo · 1 comment
Owner

Originally created by @Wwwduojin on GitHub (Jul 30, 2025).

Checked other resources

  • This is a bug, not a usage question. For questions, please use the LangChain Forum (https://forum.langchain.com/).
  • I added a very descriptive title to this issue.
  • I searched the LangChain.js documentation with the integrated search.
  • I used the GitHub search to find a similar question and didn't find it.
  • I am sure that this is a bug in LangChain.js rather than my code.
  • The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

Example Code

tools = [
    deal_strategy_info,
    dataloader
]
bind_model = model.bind_tools(tools, parallel_tool_calls=False, tool_choice="auto")

def chat_node(state: O2State):
    return {"messages": [bind_model.invoke( state["messages"])]}


graph_builder = StateGraph(O2State)
graph_builder.add_node("chat_node", chat_node)
graph_builder.add_node("tools", ToolNode(tools=tools))

graph_builder.add_edge(START, "chat_node")
graph_builder.add_conditional_edges("chat_node", tools_condition)
graph_builder.add_edge("tools", "chat_node")

graph = graph_builder.compile(
    checkpointer=InMemorySaver(),  # 从来保存对轮对话之间的 message ,(可注释掉来对比差异)
    # store=InMemoryStore(),  # 用来保存多轮对话之间的信息 ,(可注释掉来对比差异)
)

Error Message and Stack Trace (if applicable)

No response

Description

When I used the latest model Qwen3-235B-A22B-Instruct-2507-FP8, I bound tools to it, but when it returned, it directly returned the results of the tool execution(deal_strategy_info), instead of indicating which tool should be executed:

[AIMessage(content='<tool_call>\n{"name": "Update delivery information", "arguments": {"budget": 10000000, "days": 14}\n</tool_call>', additional_kwargs={'refusal': None}, response_metadata={'token_usage': {'completion_tokens': 135, 'prompt_tokens': 553, 'total_tokens': 688, 'completion_tokens_details': None, 'prompt_tokens_details': None}, 'model_name': 'Qwen3-235B-A22B-Instruct-2507-FP8', 'system_fingerprint': None, 'id': 'xxx', 'service_tier': None, 'finish_reason': 'stop', 'logprobs': None}, id='xxx', usage_metadata={'input_tokens': 553, 'output_tokens': 135, 'total_tokens': 688, 'input_token_details': {}, 'output_token_details': {}})]

System Info

langgraph 0.6.1

Originally created by @Wwwduojin on GitHub (Jul 30, 2025). ### Checked other resources - [x] This is a bug, not a usage question. For questions, please use the LangChain Forum (https://forum.langchain.com/). - [x] I added a very descriptive title to this issue. - [x] I searched the LangChain.js documentation with the integrated search. - [x] I used the GitHub search to find a similar question and didn't find it. - [x] I am sure that this is a bug in LangChain.js rather than my code. - [x] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package). ### Example Code ``` tools = [ deal_strategy_info, dataloader ] bind_model = model.bind_tools(tools, parallel_tool_calls=False, tool_choice="auto") def chat_node(state: O2State): return {"messages": [bind_model.invoke( state["messages"])]} graph_builder = StateGraph(O2State) graph_builder.add_node("chat_node", chat_node) graph_builder.add_node("tools", ToolNode(tools=tools)) graph_builder.add_edge(START, "chat_node") graph_builder.add_conditional_edges("chat_node", tools_condition) graph_builder.add_edge("tools", "chat_node") graph = graph_builder.compile( checkpointer=InMemorySaver(), # 从来保存对轮对话之间的 message ,(可注释掉来对比差异) # store=InMemoryStore(), # 用来保存多轮对话之间的信息 ,(可注释掉来对比差异) ) ``` ### Error Message and Stack Trace (if applicable) _No response_ ### Description When I used the latest model Qwen3-235B-A22B-Instruct-2507-FP8, I bound tools to it, but when it returned, it directly returned the results of the tool execution(deal_strategy_info), instead of indicating which tool should be executed: [AIMessage(content='<tool_call>\n{"name": "Update delivery information", "arguments": {"budget": 10000000, "days": 14}\n</tool_call>', additional_kwargs={'refusal': None}, response_metadata={'token_usage': {'completion_tokens': 135, 'prompt_tokens': 553, 'total_tokens': 688, 'completion_tokens_details': None, 'prompt_tokens_details': None}, 'model_name': 'Qwen3-235B-A22B-Instruct-2507-FP8', 'system_fingerprint': None, 'id': 'xxx', 'service_tier': None, 'finish_reason': 'stop', 'logprobs': None}, id='xxx', usage_metadata={'input_tokens': 553, 'output_tokens': 135, 'total_tokens': 688, 'input_token_details': {}, 'output_token_details': {}})] ### System Info langgraph 0.6.1
yindo added the bug label 2026-02-20 17:42:11 -05:00
yindo closed this issue 2026-02-20 17:42:11 -05:00
Author
Owner

@sydney-runkle commented on GitHub (Sep 8, 2025):

Hmm seems like a qwen issue, I'd recommend reaching out to langchain-qwq folks!

@sydney-runkle commented on GitHub (Sep 8, 2025): Hmm seems like a qwen issue, I'd recommend reaching out to `langchain-qwq` folks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#872