Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Covers LangChain 1.0 typed content blocks in AIMessage.content (text, tool_use, image, thinking, document) across Claude, GPT-4o, Gemini.
73% 100%+27 ptsof test cases passed
Passed 22 of 22 test cases with the skill, and 16 of 22 without it.
What built-in method on LangChain 1.0 `AIMessage` objects returns the concatenated string representation of all text blocks in `msg.content` regardless of provider?
The response identifies msg.text() as the built-in method.
This test ran on v1. v2 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
On Claude, AIMessage.content is list[dict] even for pure text — so any
code from an OpenAI-first tutorial that calls message.content.lower() or
message.content.split() crashes with AttributeError: 'list' object has no attribute 'lower' on the first production Claude call (P02).
Multi-modal code that works on GPT-4o breaks on Claude because pre-1.0
image-block shapes differed across providers (P64). Multi-turn Claude
replay with extended thinking fails with
anthropic.BadRequestError: missing signature when prior thinking
blocks are stripped. Forced tool_choice prevents
stop_reason="end_turn" and loops forever (P63).
This is the deep-dive companion to langchain-model-inference. That
skill's references/content-blocks.md covers the str vs list[dict]
divergence and a safe text extractor. This skill goes further:
tool_use block iteration mechanics — IDs, args as dict vs JSON string, streaming deltasthinking blocks — signature, redaction, multi-turn replay semanticsdocument blocks — Claude citations API, source types, citation extractionimage shape, per-provider adapter behaviorPin: langchain-core 1.0.x, langchain-anthropic >= 1.0,
langchain-openai >= 1.0, anthropic >= 0.40. Pain-catalog anchors:
P02, P58, P63, P64.
langchain-core >= 1.0, < 2.0pip install langchain-anthropic langchain-openailangchain-anthropic >= 1.0 and Claude Sonnet 4+ / Opus 4+anthropic >= 0.40 and Claude Sonnet 4+langchain-model-inference (reads references/content-blocks.md first)Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.