ByteDance-Seed / ByteDance-Seed/seed-oss

Tool call format error when set thinking_budget=0

Open
#14 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
891
Forks
53
PR merge metrics
No merged PRs in 30d

Description

Hi, I found the following issue when deploying and testing tool calls locally.

When I don't set `thinking_budget`, everything works fine and the tool call returns results in the `tool_calls` field as expected. However, when I set it to:
```
{"thinking_budget": 0}
```
there is a problem with the tool call format. The tool call content returned by the LLM appears in the `content` field instead of the `tool_calls` field.

Here are my request parameters:
```json
{
"model": "seed_oss",
"messages": [
{
"role": "system",
"content": "你是一个有用的助手。当用户询问时间相关问题时,请使用提供的工具来获取准确信息。"
},
{
"role": "user",
"content": "请问现在几点了?"
}
],
"temperature": 0.7,
"max_tokens": 1000,
"stream": true,
"chat_template_kwargs": {
"thinking_budget": 0
},
"tools": [
{
"type": "function",
"function": {
"name": "get_current_time",
"description": "获取当前时间的工具。当用户询问现在几点或当前时间时,调用此工具。",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}
}
],
"tool_choice": "auto"
}
```

The following figure shows the difference in behavior when `thinking_budget: 0` is enabled versus disabled.

Image

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the supplied chat completion request with and without chat_template_kwargs.thinking_budget set to 0, focusing on streamed tool-call fields. Trace where the response is assembled and determine why the tool call is emitted in content; done means the same request places the tool call in tool_calls while preserving the expected response format.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.