-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Open
Labels
area:chatRelates to chat interfaceRelates to chat interfaceide:vscodeRelates specifically to VS Code extensionRelates specifically to VS Code extensionkind:bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behavioros:macHappening specifically on MacHappening specifically on Mac
Description
Before submitting your bug report
- I've tried using the "Ask AI" feature on the Continue docs site to see if the docs have an answer
- I believe this is a bug. I'll try to join the Continue Discord for questions
- I'm not able to find an open issue that reports the same bug
- I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- OS: macOS
- Continue version: 1.2.9
- IDE version: VSCodium 1.88.1
- Model: Claude Haiku 4.5
- config:
models:
- name: Claude Haiku 4.5
provider: anthropic
model: claude-haiku-4-5-20251001
OR link to agent in Continue hub:
Description
When Haiku 4.5 tried to browse the project files (via ls
) - the anthropic API errored out with:
{"type":"invalid_request_error","message":"messages: text content blocks must be non-empty"}
When I switch it back to Sonnet 4.5 - it works like a charm.
I dug into the message and it looks like there is an extra empty text block in the assistant's side when it tries to call the tool. I don't know whether this was generated by the assistant or not, but I copied out the messages to test them manually via curl
, it works when I remove the empty text block.
Perhaps this is an Anthropic issue, but for now Continue cannot work with Haiku unless the empty block is not included when sent back to Antropic.
The messages look like below - note there is an empty text block right right before the tool calling.
{
"msg": {
"messageId": "2327c304-023f-45e1-9530-0f675310aa56",
"messageType": "llm/streamChat",
"data": {
"completionOptions": {
"reasoning": true,
"reasoningBudgetTokens": 2048
},
"title": "Claude Haiku 4.5",
"messages": [
{
"role": "system",
"content": "<important_rules>\n You are in agent mode.\n\n ..."
},
{
"role": "user",
"content": [
{
"type": "text",
"text": "explore the project structures"
}
]
},
{
"role": "thinking",
"content": "The user wants me to explore the project structure. I should start by listing the files in the current directory to get an overview of what's there. I'll use the ls tool to explore the root directory recursively to see the project structure.",
"signature": "..."
},
{
"role": "assistant",
"content": [
{
"type": "text",
"text": ""
},
{
"type": "text",
"text": "```tool\nTOOL_NAME: ls\nBEGIN_ARG: dirPath\n\".\"\nEND_ARG\nBEGIN_ARG: recursive\ntrue\nEND_ARG\n```"
}
]
},
{
"role": "user",
"content": [
{
"type": "text",
"text": "Tool output for ls tool call:\n\n.git/\n.gitignore\n..."
}
]
}
],
"messageOptions": {
"precompiled": true
}
}
}
To reproduce
- Configure Continue for Haiku 4.5 (use the config from above)
- Ask Haiku to browse the local files
Log output
See the message detail in the description
workbench.desktop.main.js:1647 [@continuedev] error: HTTP 400 Bad Request from https://api.anthropic.com/v1/messages
{"type":"error","error":{"type":"invalid_request_error","message":"messages: text content blocks must be non-empty"},"request_id":"req_011CUDEHpjbhH4uQEWM5EwdP"} {"context":"llm_fetch","url":"https://api.anthropic.com/v1/messages","method":"POST","model":"claude-haiku-4-5-20251001","provider":"anthropic"}
[@continuedev] error: HTTP 400 Bad Request from https://api.anthropic.com/v1/messages
{"type":"error","error":{"type":"invalid_request_error","message":"messages: text content blocks must be non-empty"},"request_id":"req_011CUDEHpjbhH4uQEWM5EwdP"} {"context":"llm_stream_chat","model":"claude-haiku-4-5-20251001","provider":"anthropic","useOpenAIAdapter":false,"streamEnabled":true,"templateMessages":false}
Metadata
Metadata
Assignees
Labels
area:chatRelates to chat interfaceRelates to chat interfaceide:vscodeRelates specifically to VS Code extensionRelates specifically to VS Code extensionkind:bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behavioros:macHappening specifically on MacHappening specifically on Mac
Type
Projects
Status
Todo