Skip to content

fix: Langchain test error#738

Closed
fern-support wants to merge 2 commits intomainfrom
fern-support/fix-langchain
Closed

fix: Langchain test error#738
fern-support wants to merge 2 commits intomainfrom
fern-support/fix-langchain

Conversation

@fern-support
Copy link
Collaborator

@fern-support fern-support commented Mar 12, 2026

Summary

Investigation into the failing test-langchain-cohere CI job.

Findings

The test_langchain_tool_calling_agent integration test in langchain-cohere is failing because the model returns empty tool call arguments {} for a tool that requires an input parameter, causing a Pydantic validation error.

Root causes investigated:

  • The test originally used command-r-plus, which resolves to command-r-plus-04-2024 (deprecated Sept 15, 2025)
  • We patched it to use command-a-03-2025 — same failure
  • The test hits the live Cohere API with no temperature=0 setting, making it inherently non-deterministic
  • The failure is in langchain-cohere's test suite, not in cohere-python

Reproduction: A whitespace-only change on a fresh branch produces the same failure, confirming it's unrelated to any SDK code changes.

Recommendation

We should skip the test-langchain-cohere CI job (or mark it as continue-on-error) until the upstream test is fixed. The job clones langchain-cohere at HEAD and runs its integration tests against the live API — we have no control over its stability. The issue should be reported to https://github.com/langchain-ai/langchain-cohere.

fern-support and others added 2 commits March 12, 2026 09:48
command-r-plus resolves to command-r-plus-04-2024 which was deprecated
2025-09-15, causing flaky tool calling failures. Patch the cloned
langchain-cohere tests to use command-a-03-2025 instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fern-support added a commit that referenced this pull request Mar 12, 2026
The test_langchain_tool_calling_agent test uses deprecated models and
hits the live API without temperature=0, causing non-deterministic
failures unrelated to SDK changes. See PR #738 for investigation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fern-support added a commit that referenced this pull request Mar 12, 2026
Instead of skipping the entire langchain-cohere job, deselect only the
single flaky test. The remaining 39 integration tests and 98 unit tests
still run. See PR #738 for investigation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant