diff --git a/Makefile b/Makefile index e629494..4bfd878 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,9 @@ TEST_FILE ?= tests/unit_tests/ test: python -m pytest $(TEST_FILE) +integration_tests: + python -m pytest tests/integration_tests + test_watch: python -m ptw --snapshot-update --now . -- -vv tests/unit_tests diff --git a/README.md b/README.md index 6a5d6c2..e869ed1 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ The primary [search tool](./src/react_agent/tools.py) [^1] used is [Tavily](http The defaults values for `model` are shown below: ```yaml -model: anthropic/claude-3-5-sonnet-20240620 +model: claude-sonnet-4-5-20250929 ``` Follow the instructions below to get set up, or pick one of the additional options. diff --git a/pyproject.toml b/pyproject.toml index 06e5060..1e44a90 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,6 +62,7 @@ convention = "google" [dependency-groups] dev = [ + "anyio>=4.7.0", "langgraph-cli[inmem]>=0.1.71", "pytest>=8.3.5", ] diff --git a/src/react_agent/context.py b/src/react_agent/context.py index d691776..238ccfd 100644 --- a/src/react_agent/context.py +++ b/src/react_agent/context.py @@ -22,7 +22,7 @@ class Context: ) model: Annotated[str, {"__template_metadata__": {"kind": "llm"}}] = field( - default="anthropic/claude-4-5", + default="anthropic/claude-sonnet-4-5-20250929", metadata={ "description": "The name of the language model to use for the agent's main interactions. " "Should be in the form: provider/model-name." diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..ad84bd0 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,7 @@ +import pytest + + +@pytest.fixture(scope="session") +def anyio_backend(): + return "asyncio" + diff --git a/tests/integration_tests/test_graph.py b/tests/integration_tests/test_graph.py index 8c4ac57..a84adc3 100644 --- a/tests/integration_tests/test_graph.py +++ b/tests/integration_tests/test_graph.py @@ -1,12 +1,11 @@ import pytest -from langsmith import unit from react_agent import graph from react_agent.context import Context +pytestmark = pytest.mark.anyio + -@pytest.mark.asyncio -@unit async def test_react_agent_simple_passthrough() -> None: res = await graph.ainvoke( {"messages": [("user", "Who is the founder of LangChain?")]}, # type: ignore