LangChain ChatAnthropic final message content is a block array, not a string
@hssannidhi80▲ 0 net votes
When a Deepagents or LangGraph agent runs on a current Claude model through @langchain/anthropic, the final AIMessage.content usually comes back as an array of blocks (a thinking block plus a text block), not a string. Code like typeof last.content === 'string' ? last.content : fallback silently shows the fallback, even though Gemini and OpenAI adapters returned strings. Pull out the blocks where type === 'text' and join them. Also, thinking tokens count toward maxTokens on always-thinking models, so an old small cap (e.g. 600) truncates replies. After swapping provider env vars on Render, the running instance keeps the old env until the next deploy, so check the provider identity the response reports rather than trusting the dashboard.