PANE

LangChain tool schemas break with Pydantic v2 strict mode

14 posts in the last 90 days, all from GitHub.

“Submission checklist [x] This is a bug, not a usage question. [x] I added a clear and descriptive title that summarizes this issue. [x] I used the GitHub search to find a similar question and didn't find it. [x] I am sure that this is a bug in LangChain rather than my code. [x]…”
GitHub
“Checked other resources [x] This is a bug, not a usage question. [x] I added a clear and descriptive title that summarizes this issue. [x] I used the GitHub search to find a similar question and didn't find it. [x] I am sure that this is a bug in LangChain rather than my code…”
GitHub
“Bug Description With pydantic program mode=PydanticProgramMode.LLM (text completion structured output), OpenAI.structured predict() (inherited by OpenAILike ) still forces tool choice="required" but sends no tools . OpenAI compatible servers reject that request with HTTP 400, so…”
GitHub

LangChain users report TypeErrors when converting tool schemas to OpenAI function schemas, particularly when using Pydantic v2 models. The issue causes silent failures in tool invocation and response generation.

ailangchaintool-schemaspydantic-v2typeerror
FIT
0%
SIGNAL
50%
SOURCES24
FRESHEST POST7D AGO
TRACKED SINCE111D AGO

SOURCES (24)

“Submission checklist [x] This is a bug, not a usage question. [x] I added a clear and descriptive title that summarizes this issue. [x] I used the GitHub search to find a similar question and didn't find it. [x] I am sure that this is…”

GITHUB7d ago

“Submission checklist [x] This is a bug, not a usage question. [x] I added a clear and descriptive title that summarizes this issue. [x] I used the GitHub search to find a similar question and didn't find it. [x] I am sure that this is a bug in LangChain rather than my code. [x] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package). [x] This is not related to the langchain community package. [x] I posted a self contained, minimal, repr”

GITHUB18d ago

“Bug Description With pydantic program mode=PydanticProgramMode.LLM (text completion structured output), OpenAI.structured predict() (inherited by OpenAILike ) still forces tool choice="required" but sends no tools . OpenAI compatible servers reject that request with HTTP 400, so text mode structured prediction always fails before the model can answer. In our runs, vLLM answered: When using tool choice, tools must be set. (parameter=tool choice) . Cause: llama index llms openai , llama index/llms”

GITHUB27d ago

“Submission checklist [x] This is a bug, not a usage question. [x] I added a clear and descriptive title that summarizes this issue. [x] I used the GitHub search to find a similar question and didn't find it. [x] I am sure that this is a bug in LangChain rather than my code. [x] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package). [x] This is not related to the langchain community package. [x] I posted a self contained, minimal, repr”

GITHUBOct 27

“Submission checklist [x] This is a bug, not a usage question. [x] I added a clear and descriptive title that summarizes this issue. [x] I used the GitHub search to find a similar question and didn't find it. [x] I am sure that this is a bug in LangChain rather than my code. [x] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package). [x] This is not related to the langchain community package. [x] I posted a self contained, minimal, repr”

GITHUBOct 20

“Submission checklist [x] This is a bug, not a usage question. [x] I added a clear and descriptive title that summarizes this issue. [x] I used the GitHub search to find a similar question and didn't find it. [x] I am sure that this is a bug in LangChain rather than my code. [x] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package). [x] This is not related to the langchain community package. [x] I posted a self contained, minimal, repr”

GITHUBOct 20

“Submission checklist [x] This is a bug, not a usage question. [x] I added a clear and descriptive title that summarizes this issue. [x] I used the GitHub search to find a similar question and didn't find it. [x] I am sure that this is a bug in LangChain rather than my code. [x] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package). [x] This is not related to the langchain community package. [x] I posted a self contained, minimal, repr”

GITHUBOct 12

“Submission checklist [x] This is a bug, not a usage question. [x] I added a clear and descriptive title that summarizes this issue. [x] I used the GitHub search to find a similar question and didn't find it. [x] I am sure that this is a bug in LangChain rather than my code. [x] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package). [x] This is not related to the langchain community package. [x] I posted a self contained, minimal, repr”

GITHUBOct 9

“Submission checklist [x] This is a bug, not a usage question. [x] I added a clear and descriptive title that summarizes this issue. [x] I used the GitHub search to find a similar question and didn't find it. [x] I am sure that this is a bug in LangChain rather than my code. [x] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package). [x] This is not related to the langchain community package. [x] I posted a self contained, minimal, repr”

GITHUBOct 3

“Submission checklist [x] This is a bug, not a usage question. [x] I added a clear and descriptive title that summarizes this issue. [x] I used the GitHub search to find a similar question and didn't find it. [x] I am sure that this is a bug in LangChain rather than my code. [x] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package). [x] This is not related to the langchain community package. [x] I posted a self contained, minimal, repr”

GITHUBOct 1

“Submission checklist [x] This is a bug, not a usage question. [x] I added a clear and descriptive title that summarizes this issue. [x] I used the GitHub search to find a similar question and didn't find it. [x] I am sure that this is a bug in LangChain rather than my code. [x] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package). [x] This is not related to the langchain community package. [x] I posted a self contained, minimal, repr”

GITHUBSep 29

“Submission checklist [x] This is a bug, not a usage question. [x] I added a clear and descriptive title that summarizes this issue. [x] I used the GitHub search to find a similar question and didn't find it. [x] I am sure that this is a bug in LangChain rather than my code. [x] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package). [x] This is not related to the langchain community package. [x] I posted a self contained, minimal, repr”

GITHUBSep 22

“Submission checklist [x] This is a bug, not a usage question. [x] I added a clear and descriptive title that summarizes this issue. [x] I used the GitHub search to find a similar question and didn't find it. [x] I am sure that this is a bug in LangChain rather than my code. [x] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package). [x] This is not related to the langchain community package. [x] I posted a self contained, minimal, repr”

GITHUBSep 22

“Submission checklist [x] This is a bug, not a usage question. [x] I added a clear and descriptive title that summarizes this issue. [x] I used the GitHub search to find a similar question and didn't find it. [x] I am sure that this is a bug in LangChain rather than my code. [x] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package). [x] This is not related to the langchain community package. [x] I posted a self contained, minimal, repr”

GITHUBSep 9

“Submission checklist [x] This is a bug, not a usage question. [x] I added a clear and descriptive title that summarizes this issue. [x] I used the GitHub search to find a similar question and didn't find it. [x] I am sure that this is a bug in LangChain rather than my code. [x] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package). [x] This is not related to the langchain community package. [x] I posted a self contained, minimal, repr”

GITHUBAug 26

“Your current environment <details <summary The output of <code python collect env.py</code </summary </details 🐛 Describe the bug When the reasoning parser and the tool parser resolve to the same streaming parser engine, for example reasoning parser qwen3 tool call parser qwen3 coder , vLLM attaches no xgrammar structural tag to the request. Strict tool calling is silently a no op: VLLM ENFORCE STRICT TOOL CALLING , the per tool strict: true flag, and tool choice="required" all produce unconstr”

GITHUBAug 25

“Submission checklist [x] This is a bug, not a usage question. [x] I added a clear and descriptive title that summarizes this issue. [x] I used the GitHub search to find a similar question and didn't find it. [x] I am sure that this is a bug in LangChain rather than my code. [x] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package). [x] This is not related to the langchain community package. [x] I posted a self contained, minimal, repr”

GITHUBAug 19

“Submission checklist [x] This is a bug, not a usage question. [x] I added a clear and descriptive title that summarizes this issue. [x] I used the GitHub search to find a similar question and didn't find it. [x] I am sure that this is a bug in LangChain rather than my code. [x] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package). [x] This is not related to the langchain community package. [x] I posted a self contained, minimal, repr”

GITHUBAug 19

“Your current environment <details <summary The output of <code python collect env.py</code </summary </details 🐛 Describe the bug When a tool schema contains Pydantic v2 style $defs / $ref / anyOf , vLLM can return nested object tool arguments as JSON encoded strings instead of JSON objects. The raw model output contains valid nested JSON objects inside Qwen style <parameter=... tags, but the final OpenAI compatible tool call.function.arguments string contains those nested objects double encode”

GITHUBJun 27

“Submission checklist [x] This is a bug, not a usage question. [x] I added a clear and descriptive title that summarizes this issue. [x] I used the GitHub search to find a similar question and didn't find it. [x] I am sure that this is a bug in LangChain rather than my code. [x] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package). [x] This is not related to the langchain community package. [x] I posted a self contained, minimal, repr”

GITHUBJun 1

“Checked other resources [x] This is a bug, not a usage question. [x] I added a clear and descriptive title that summarizes this issue. [x] I used the GitHub search to find a similar question and didn't find it. [x] I am sure that this is a bug in LangChain rather than my code. [x] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package). [x] This is not related to the langchain community package. [x] I posted a self contained, minimal, r”

GITHUBApr 8

“Checked other resources [x] This is a bug, not a usage question. [x] I added a clear and descriptive title that summarizes this issue. [x] I used the GitHub search to find a similar question and didn't find it. [x] I am sure that this is a bug in LangChain rather than my code. [x] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package). [x] This is not related to the langchain community package. [x] I posted a self contained, minimal, r”

GITHUBDec 2025

“Checked other resources [x] This is a bug, not a usage question. [x] I added a clear and descriptive title that summarizes this issue. [x] I used the GitHub search to find a similar question and didn't find it. [x] I am sure that this is a bug in LangChain rather than my code. [x] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package). [x] This is not related to the langchain community package. [x] I posted a self contained, minimal, r”

GITHUBNov 2025

“Checked other resources [x] This is a bug, not a usage question. For questions, please use the LangChain Forum (https://forum.langchain.com/). [x] I added a clear and descriptive title that summarizes this issue. [x] I used the GitHub search to find a similar question and didn't find it. [x] I am sure that this is a bug in LangChain rather than my code. [x] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package). [x] I read what a minim”

GITHUBJul 2025

SOLUTION LANDSCAPE

Brought to you byTop Sectors

A Player feature.See how many ways this pain can be solved, who's already building, and where the gaps are.

More ideas in AI & LLMs →