The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
infra: reenable min version testing 2, ci ignore ai21 (#25709)
Erick Friis3dc7d447aa53
diff --git a/.github/scripts/check_diff.py b/.github/scripts/check_diff.pyindex 4ee411a00a..e10c152ef2 100644--- a/.github/scripts/check_diff.py+++ b/.github/scripts/check_diff.py@@ -16,6 +16,18 @@ LANGCHAIN_DIRS = ["libs/experimental",]+# ignored partners are removed from dependents+# but still run if directly edited+IGNORED_PARTNERS = [+ # remove huggingface from dependents because of CI instability+ # specifically in huggingface jobs+ # https://github.com/langchain-ai/langchain/issues/25558+ "huggingface",+ # remove ai21 because of breaking changes in sdk version 2.14.0+ # that have not been fixed yet+ "ai21",+]+def all_package_dirs() -> Set[str]:return {@@ -69,12 +81,10 @@ def dependents_graph() -> dict:if "langchain" in dep:dependents[dep].add(pkg_dir)- # remove huggingface from dependents because of CI instability- # specifically in huggingface jobs- # https://github.com/langchain-ai/langchain/issues/25558for k in dependents:- if "libs/partners/huggingface" in dependents[k]:- dependents[k].remove("libs/partners/huggingface")+ for partner in IGNORED_PARTNERS:+ if f"libs/partners/{partner}" in dependents[k]:+ dependents[k].remove(f"libs/partners/{partner}")return dependentsdiff --git a/.github/workflows/_test.yml b/.github/workflows/_test.ymlindex 843eab8353..d73ffe65e0 100644--- a/.github/workflows/_test.yml+++ b/.github/workflows/_test.yml@@ -75,12 +75,11 @@ jobs:echo "min-versions=$min_versions" >> "$GITHUB_OUTPUT"echo "min-versions=$min_versions"-# Temporarily disabled until we can get the minimum versions working-# - name: Run unit tests with minimum dependency versions-# if: ${{ steps.min-version.outputs.min-versions != '' }}-# env:-# MIN_VERSIONS: ${{ steps.min-version.outputs.min-versions }}-# run: |-# poetry run pip install --force-reinstall $MIN_VERSIONS --editable .-# make tests-# working-directory: ${{ inputs.working-directory }}+ - name: Run unit tests with minimum dependency versions+ if: ${{ steps.min-version.outputs.min-versions != '' }}+ env:+ MIN_VERSIONS: ${{ steps.min-version.outputs.min-versions }}+ run: |+ poetry run pip install --force-reinstall $MIN_VERSIONS --editable .+ make tests+ working-directory: ${{ inputs.working-directory }}diff --git a/libs/core/tests/unit_tests/runnables/test_runnable.py b/libs/core/tests/unit_tests/runnables/test_runnable.pyindex 2b1d173df9..13d28b4d92 100644--- a/libs/core/tests/unit_tests/runnables/test_runnable.py+++ b/libs/core/tests/unit_tests/runnables/test_runnable.py@@ -3133,7 +3133,7 @@ def test_map_stream() -> None:assert streamed_chunks[0] in [{"passthrough": prompt.invoke({"question": "What is your name?"})},{"llm": "i"},- {"chat": AIMessageChunk(content="i")},+ {"chat": _AnyIdAIMessageChunk(content="i")},]assert len(streamed_chunks) == len(chat_res) + len(llm_res) + 1assert all(len(c.keys()) == 1 for c in streamed_chunks)@@ -3191,7 +3191,7 @@ def test_map_stream() -> None:assert streamed_chunks[0] in [{"llm": "i"},- {"chat": AIMessageChunk(content="i")},+ {"chat": _AnyIdAIMessageChunk(content="i")},]assert len(streamed_chunks) == len(llm_res) + len(chat_res)@@ -3234,7 +3234,7 @@ def test_map_stream_iterator_input() -> None:assert streamed_chunks[0] in [{"passthrough": "i"},{"llm": "i"},- {"chat": AIMessageChunk(content="i")},+ {"chat": _AnyIdAIMessageChunk(content="i")},]assert len(streamed_chunks) == len(chat_res) + len(llm_res) + len(llm_res)assert all(len(c.keys()) == 1 for c in streamed_chunks)