# Error using Claude 3.7 Sonnet with Discourse AI plugin

**URL:** https://meta.discourse.org/t/error-using-claude-3-7-sonnet-with-discourse-ai-plugin/354624
**Category:** Bug
**Tags:** ai, ai-bot
**Created:** [February 26, 2025, 1:46pm UTC](https://meta.discourse.org/t/error-using-claude-3-7-sonnet-with-discourse-ai-plugin/354624 "2025-02-26T13:46:44Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![emansilla](https://avatars.discourse-cdn.com/v4/letter/e/94ad74/32.png) [@emansilla](https://meta.discourse.org/u/emansilla)
#### Post date: [February 26, 2025, 1:46pm UTC](https://meta.discourse.org/t/error-using-claude-3-7-sonnet-with-discourse-ai-plugin/354624/1 "2025-02-26T13:46:44Z")

</div>

Hello,

I have been trying to use Claude 3.7 Sonnet with the forum helper persona and with custom personas and I get the error below. I have the latest version of Discourse and the latest version of the Discourse AI plugin. The steps to reproduce are simple, just ask a question to the bot and it will perform a tool use such as search, category or read and afterwards I get the error. The LLM is configured with reasoning enabled and 1024 tokens used for reasoning. Can you please confirm if this is a bug or if something is missing in my configuration? Thank you very much!

`{“type”:“error”,“error”:{“type”:“invalid_request_error”,“message”:“messages.1.content.0.type: Expected `thinking`or`redacted\_thinking`, but found`tool\_use`. When`thinking`is enabled, a final`assistant`message must start with a thinking block (preceeding the lastmost set of`tool\_use`and`tool\_result`blocks). We recommend you include thinking blocks from previous turns. To avoid this requirement, disable`thinking` . Please consult our documentation at [Building with extended thinking - Anthropic](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)”}}`

---

_[View the full topic](https://meta.discourse.org/t/error-using-claude-3-7-sonnet-with-discourse-ai-plugin/354624)._
