Skip to content

Conversation

@Deshbhushan
Copy link

This PR adds missing unit tests for the reasoning parameter in ChatOllama.

The reasoning parameter (used for thinking models like DeepSeek R1) was implemented but lacked explicit unit tests. This test ensures the parameter is correctly passed to the Ollama API as the think parameter.

Test Coverage:

  • reasoning=True in constructor
  • reasoning=False in constructor
  • reasoning passed in invoke() method

Fixes missing test coverage for the reasoning feature.(Replace this entire block of text)

Thank you for contributing to LangChain! Follow these steps to mark your pull request as ready for review. If any of these steps are not completed, your PR will not be considered for review.

  • PR title: Follows the format: {TYPE}({SCOPE}): {DESCRIPTION}

    • Examples:
      • feat(core): add multi-tenant support
      • fix(cli): resolve flag parsing error
      • docs(openai): update API usage examples
    • Allowed {TYPE} values:
      • feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert, release
    • Allowed {SCOPE} values (optional):
      • core, cli, langchain, standard-tests, text-splitters, docs, anthropic, chroma, deepseek, exa, fireworks, groq, huggingface, mistralai, nomic, ollama, openai, perplexity, prompty, qdrant, xai, infra
    • Once you've written the title, please delete this checklist item; do not include it in the PR.
  • PR message: Delete this entire checklist and replace with

  • Lint and test: Run make format, make lint and make test from the root of the package(s) you've modified. We will not consider a PR unless these three are passing in CI. See contribution guidelines for more.

Additional guidelines:

  • Most PRs should not touch more than one package.
  • Please do not add dependencies to pyproject.toml files (even optional ones) unless they are required for unit tests. Likewise, please do not update the uv.lock files unless you are adding a required dependency.
  • Changes should be backwards compatible.
  • Make sure optional dependencies are imported within a function.

@github-actions github-actions bot added integration Related to a provider partner package integration ollama labels Nov 24, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 24, 2025

CodSpeed Performance Report

Merging #34095 will not alter performance

Comparing Deshbhushan:main (6b4b10d) with master (c375732)1

Summary

✅ 1 untouched
⏩ 33 skipped2

Footnotes

  1. No successful run was found on master (7fe1c4b) during the generation of this report, so c375732 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 mdrxy changed the title tests: Add unit test for ChatOllama reasoning parametertests: Add unit test for ChatOllama reasoning parameter tests: Add unit test for ChatOllama reasoning parameter Nov 24, 2025
@mdrxy mdrxy changed the title tests: Add unit test for ChatOllama reasoning parameter test(ollama): Add unit test for ChatOllama reasoning parameter Nov 24, 2025
@github-actions github-actions bot added the tests label Nov 24, 2025
@mdrxy
Copy link
Member

mdrxy commented Nov 24, 2025

Can you update to pass CI?

@Deshbhushan
Copy link
Author

Can you update to pass CI?

Done :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration Related to a provider partner package integration ollama tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants