Skip to content

fix(ollama): pop unsupported 'strict' argument in ChatOllama#34114

Merged
ccurme (ccurme) merged 4 commits intolangchain-ai:masterfrom
dumko2001:issue-34107
Dec 12, 2025
Merged

fix(ollama): pop unsupported 'strict' argument in ChatOllama#34114
ccurme (ccurme) merged 4 commits intolangchain-ai:masterfrom
dumko2001:issue-34107

Conversation

@dumko2001
Copy link
Copy Markdown
Contributor

This PR modifies ChatOllama to explicitly filter out the strict argument before passing parameters to the underlying Ollama client. This prevents a TypeError when using structured outputs (e.g. via ProviderStrategy) that inject this argument.

Fixes #34107

Breaking Changes:

  • None. This is a bug fix that allows previously crashing code to run successfully.

AI Disclaimer:
I used an AI assistant to generate the regression test case for this fix.

@github-actions github-actions Bot added integration PR made that is related to a provider partner package integration ollama `langchain-ollama` package issues & PRs fix For PRs that implement a fix labels Nov 27, 2025
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Nov 27, 2025

CodSpeed Performance Report

Merging #34114 will not alter performance

Comparing dumko2001:issue-34107 (d191119) with master (d6b5f05)1

Summary

✅ 1 untouched
⏩ 33 skipped2

Footnotes

  1. No successful run was found on master (3fb9066) during the generation of this report, so d6b5f05 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 33 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@mdrxy Mason Daugherty (mdrxy) changed the title fix(ollama): Filter unsupported 'strict' argument in ChatOllama #34107 fix(ollama): Filter unsupported 'strict' argument in ChatOllama Nov 27, 2025
@mdrxy Mason Daugherty (mdrxy) changed the title fix(ollama): Filter unsupported 'strict' argument in ChatOllama fix(ollama): pop unsupported 'strict' argument in ChatOllama Nov 27, 2025
@github-actions github-actions Bot added fix For PRs that implement a fix and removed fix For PRs that implement a fix labels Nov 27, 2025
@ccurme ccurme (ccurme) self-assigned this Dec 5, 2025
@ccurme ccurme (ccurme) merged commit 05ba853 into langchain-ai:master Dec 12, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external fix For PRs that implement a fix integration PR made that is related to a provider partner package integration ollama `langchain-ollama` package issues & PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Structured output with OpenAI model from Ollama causes TypeError in langchain 1.1.0

3 participants