LANGCHAIN PUB_DATE: 2026.03.24

LANGCHAIN OPENAI 1.1.12 AND CORE 1.2.21 TIGHTEN STREAMING, TOKEN COUNTING, AND MODEL DRIFT CHECKS

LangChain shipped langchain-openai 1.1.12 and langchain-core 1.2.21 with fixes to streaming, token counting, and model profile schema handling. In [langchain-o...

LangChain OpenAI 1.1.12 and Core 1.2.21 tighten streaming, token counting, and model drift checks

LangChain shipped langchain-openai 1.1.12 and langchain-core 1.2.21 with fixes to streaming, token counting, and model profile schema handling.

In langchain-openai 1.1.12, streaming function_call chunks keep the namespace field. Responses inputs tag items with type: message. Image token counting closes PIL handles to avoid fd leaks. It also adds the OpenAI phase parameter and bumps the minimum core version.

In langchain-core 1.2.21, ModelProfile gains missing fields and warns on schema drift. This helps spot API changes before they break agents and pipelines.

[ WHY_IT_MATTERS ]
01.

Fixes clean up subtle production bugs in streaming, Responses payloads, and image token accounting that can cause flaky agents.

02.

Schema drift warnings surface model changes early, reducing surprise failures in long-running workflows.

[ WHAT_TO_TEST ]
  • terminal

    Run integration tests for streaming tool/function-calling and verify namespace and type fields appear as expected in Responses flows.

  • terminal

    Stress multimodal runs with images to confirm no file descriptor leaks and stable token counting under load.

[ BROWNFIELD_PERSPECTIVE ]

Legacy codebase integration strategies...

  • 01.

    Roll out 1.1.12/1.2.21 behind canaries; monitor logs for schema drift warnings and any payload shape differences in streaming and Responses.

  • 02.

    Remove local workarounds for missing namespace, type tagging, or image handle leaks that these fixes now cover.

[ GREENFIELD_PERSPECTIVE ]

Fresh architecture paradigms...

  • 01.

    Rely on updated ModelProfile metadata and drift warnings to choose models and catch API shifts automatically.

  • 02.

    Build agents on the official streaming and Responses behaviors to keep payload handling simple and predictable.

SUBSCRIBE_FEED
Get the digest delivered. No spam.