Skip to content

Bump dependencies and make evaluation not installed in testing#172

Open
sonleoracle wants to merge 3 commits into
mainfrom
deps/combine-26-2-bumps
Open

Bump dependencies and make evaluation not installed in testing#172
sonleoracle wants to merge 3 commits into
mainfrom
deps/combine-26-2-bumps

Conversation

@sonleoracle
Copy link
Copy Markdown
Member

@sonleoracle sonleoracle commented May 4, 2026

Closes #116 #167 #168 #169 #170

Updates dependency pins for the 26.2 branch and separates evaluation from the default dev install because of dependency conflicts with the LangGraph/OpenAI stack.

Key changes:

  • Bumps approved direct dependency constraints, including LangGraph/LangChain/LiteLLM-related versions.
  • Keeps CVE-driven transitive pins in setup.py rather than constraints.txt.
  • Removes evaluation from the default dev extras install, matching the CrewAI-style optional pattern.
  • Adds lazy LiteLLM handling so evaluation modules can import without LiteLLM installed.
  • Adds an evaluation test conftest.py to register/skip LiteLLM-only tests when the optional dependency is absent.

Note that this means the CI will stop running tests for the evaluation submodule.

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label May 4, 2026
@sonleoracle sonleoracle force-pushed the deps/combine-26-2-bumps branch 3 times, most recently from 115da65 to 5d00e91 Compare May 4, 2026 14:34
@sonleoracle sonleoracle marked this pull request as ready for review May 4, 2026 15:00
@sonleoracle sonleoracle requested a review from a team May 4, 2026 15:00
@dhilloulinoracle
Copy link
Copy Markdown
Contributor

Internal regression succeeded 🍏: Build ID #429

from litellm import acompletion
from litellm.types.utils import ModelResponse

acompletion: Any
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this changed?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's because static type-checking under TYPE_CHECKING still requires [evaluation] to be installed, but in this PR I am trying to remove that from requirements-dev.txt, so it's not installed in the CI, so it would crash the static checks

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am missing something. We were already doing the same (i.e., not installing it by default) with crewai, and the type checker was not complaining afaik. Am I missing something?

Copy link
Copy Markdown
Member Author

@sonleoracle sonleoracle May 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type checker did not complain about crewai because in github actions (.github/workflows/tests.yaml), mypy is being run with --exclude pyagentspec/src/pyagentspec/adapters/crewai. Otherwise, if mypy is also run on the crewai adapter, it would complain about uninstalled dependencies.
On the other hand, in our regression CI, it is also ignoring missing crewai imports

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just added back the static imports like before, but with mypy ignore flags



def _is_litellm_model_response(response: Any) -> bool:
ModelResponse = getattr(importlib.import_module("litellm.types.utils"), "ModelResponse")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's avoid importlib, it's not needed

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed to dynamic import of litellm

# CrewAI is not installed by default due to dependency incompatibility with other frameworks
# -e .[crewai]
# Evaluation is not installed by default due to dependency incompatibility with langchain-openai
# -e .[evaluation]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means that langgraph and evaluation cannot be used together. We must find a solution to this. What is causing the collision? Could you at least file an issue to keep track of this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need langchain-openai>=1.1.14, which needs openai>=2.26, but we also need litellm==1.83.14, which needs openai==2.24

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue filed #173

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we just wait for a litellm release that uses openai >= 2.26?

@sonleoracle sonleoracle force-pushed the deps/combine-26-2-bumps branch from 5d00e91 to f36d737 Compare May 4, 2026 15:34
@dhilloulinoracle
Copy link
Copy Markdown
Contributor

Internal regression succeeded 🍏: Build ID #433

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants