diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c04552f43..2110f7ac9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -76,12 +76,19 @@ jobs: poetry add ../../../cohere-python echo "Current cohere installation: $(poetry show cohere)" + + # Patch deprecated model references in langchain-cohere tests + # command-r-plus resolves to command-r-plus-04-2024, deprecated 2025-09-15 + # ChatCohere() with no model arg also resolves to a deprecated default + sed -i 's/DEFAULT_MODEL = "command-r-plus"/DEFAULT_MODEL = "command-a-03-2025"/' tests/integration_tests/test_langgraph_agents.py + sed -i 's/model = ChatCohere()/model = ChatCohere(model="command-a-03-2025")/' tests/integration_tests/test_langgraph_agents.py + make test make integration_test echo "tests passed" - # reset poetry changes - git checkout -- poetry.lock pyproject.toml + # reset all changes (poetry files + patched test) + git checkout -- . set -eu diff --git a/README.md b/README.md index c474bb632..718c2fdc6 100644 --- a/README.md +++ b/README.md @@ -63,3 +63,4 @@ for event in response: While we value open-source contributions to this SDK, the code is generated programmatically. Additions made directly would have to be moved over to our generation code, otherwise they would be overwritten upon the next generated release. Feel free to open a PR as a proof of concept, but know that we will not be able to merge it as-is. We suggest opening an issue first to discuss with us! On the other hand, contributions to the README are always very welcome! +