thinking_block
field returned by Claude model ignored by ChatOpenAI().invoke()
#30530
Open
5 tasks done
Labels
🤖:bug
Related to a bug, vulnerability, unexpected error with an existing feature
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
Response
The following
reasoning_content
andthinking_blocks
fields are not found in the response obtained via langchain -Note: Response variation observed due to separate LLM calls
Description
We use ChatOpenAI() as the interface for interacting with a locally API service that is based on LiteLLM and calls OpenAI or Bedrock depending on the model name. With Anthropic Claude sonnet 3.7's extended thinking, the model provides
reasoning_content
andthinking_blocks
in the response fields. However, this is swallowed by langchain and returns only the vanilla fields.System Info
The text was updated successfully, but these errors were encountered: