langchain-model-inference

Installation
SKILL.md

LangChain Model Inference (Python)

Overview

AIMessage.content is a str on simple OpenAI calls and a list[dict] on Claude the instant any tool_use, thinking, or image block enters the response. Code that does message.content.lower() crashes with AttributeError: 'list' object has no attribute 'lower' — the #1 first-production-call LangChain 1.0 bug on Anthropic. And that is one of four separate "content shape" pitfalls in this skill:

  • P02 — AIMessage.content list-vs-string divergence
  • P03 — with_structured_output(method="function_calling") silently drops Optional[list[X]] fields on ~40% of real schemas
  • P05 — temperature=0 is not deterministic on Anthropic even though it is on OpenAI
  • P58 — Claude expects the system message at position 0; middleware that reorders messages makes it silently ignored
Installs
1
GitHub Stars
2.8K
First Seen
13 days ago
langchain-model-inference — jeremylongshore/tons-of-skills-marketplace