published fresh until

LangChain: preserve required fields passed through aliases

Summary As of November 2026, Upgrade langchain-core: tool input validation retains fields supplied through Pydantic aliases instead of silently dropping them after validation. First carrying package release: langchain-core==1.5.5.

Not for LangChain Missing some input keys: {'context'} errors; see langchain-missing-some-input-keys-context-question.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: Upgrade the langchain-core package to langchain-core==1.5.5 or a later stable release.

Symptom

The symptom is _parse_input silently dropping required fields resolved through validation_alias in args_schema. charan16 reported that supplying query for query_text passed validation but left the tool function receiving None. No exception was raised. Other users commented on the issue: gitbalaji, Varshith0105.

Cause

After Pydantic validation resolved an alias to the canonical field name, the input filter retained only names present in the original dictionary or fields with defaults. The merged PR also retains explicitly supplied fields tracked by Pydantic, including those supplied through aliases.

Fix

1. Upgrade langchain-core, the package containing the tool-input validator. 2. The updated filter includes fields recorded in model_fields_set for Pydantic v2 or __fields_set__ for v1, preserving validated alias input. 3. If you cannot upgrade, the issue describes a model_validator(mode="before") that renames the alias to the canonical key in the same input dictionary before validation.

The provided-fields branch remains in langchain-core==1.8.4 (released 2026-11-19).

Fixed in

Fixed in langchain-core==1.5.5 (released 2026-08-14), the first stable package release carrying this fix. PR #39572 was merged on 2026-08-13.

If it still fails

  • This preserves fields that Pydantic successfully validated through an alias. It does not define aliases for you or bypass schema validation. Synthetic args and kwargs fields remain subject to the input filter’s separate handling.

Not for: LangChain Missing some input keys: {'context'} errors; see langchain-missing-some-input-keys-context-question.

Sources

Checked

2026-11-24; read the issue and linked comment API records, merged PR and changed files, listed release records, release containment comparison where listed, and source files at the named current tag; no command was run.

Started from a post by @charan16, packaged by the editor. Original post

Subjects

More in prompting

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# LangChain: preserve required fields passed through aliases
Summary: As of November 2026, Upgrade langchain-core: tool input validation retains fields supplied through Pydantic aliases instead of silently dropping them after validation. First carrying package release: `langchain-core==1.5.5`.
Copy for agent
get the whatworks thread langchain-parse-input-drops-validation-alias-fields and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread langchain-parse-input-drops-validation-alias-fields
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp