Skip to content

Conversation

@sentrivana
Copy link
Contributor

@sentrivana sentrivana commented Sep 29, 2025

Description

Adapt to import changes in new langchain 1.x

Issues

Closes #4735

Reminders

@codecov
Copy link

codecov bot commented Sep 29, 2025

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
27447 2 27445 2004
View the full list of 2 ❄️ flaky test(s)
tests.profiler.test_continuous_profiler::test_continuous_profiler_auto_start_and_manual_stop[non-experiment-start_profile_session/stop_profile_session (deprecated)-gevent]

Flake rate in main: 61.70% (Passed 18 times, Failed 29 times)

Stack Traces | 0.555s run time
tests/profiler/test_continuous_profiler.py:291: in test_continuous_profiler_auto_start_and_manual_stop
    assert_single_transaction_with_profile_chunks(envelopes, thread)
tests/profiler/test_continuous_profiler.py:147: in assert_single_transaction_with_profile_chunks
    assert len(items["profile_chunk"]) > 0
E   assert 0 > 0
E    +  where 0 = len([])
tests.profiler.test_continuous_profiler::test_continuous_profiler_auto_start_and_manual_stop[non-experiment-start_profiler/stop_profiler-gevent]

Flake rate in main: 61.70% (Passed 18 times, Failed 29 times)

Stack Traces | 0.548s run time
tests/profiler/test_continuous_profiler.py:291: in test_continuous_profiler_auto_start_and_manual_stop
    assert_single_transaction_with_profile_chunks(envelopes, thread)
tests/profiler/test_continuous_profiler.py:147: in assert_single_transaction_with_profile_chunks
    assert len(items["profile_chunk"]) > 0
E   assert 0 > 0
E    +  where 0 = len([])

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@sentrivana sentrivana marked this pull request as ready for review October 23, 2025 07:14
@sentrivana sentrivana requested a review from a team as a code owner October 23, 2025 07:14
@cursor
Copy link

cursor bot commented Oct 23, 2025

Bug: AgentExecutor Import Overwrite Bug

The AgentExecutor import logic has two sequential try/except blocks. The second block unconditionally executes, causing langchain.agents.AgentExecutor to overwrite a successful langchain_classic.agents.AgentExecutor import (intended for v1+). This also means a successful langchain_classic import is lost if the langchain import fails, incorrectly setting AgentExecutor to None.

Fix in Cursor Fix in Web

@sentrivana sentrivana enabled auto-merge (squash) October 23, 2025 08:46
@sentrivana sentrivana merged commit 3d026cd into master Oct 23, 2025
128 of 130 checks passed
@sentrivana sentrivana deleted the ivana/support-langchain-v1 branch October 23, 2025 08:58
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.

Support langchain v1.0

3 participants