Skip to content

Commit 14c124d

Browse files
authored
fix: cap openai <2.45 for openai-agents 0.14.x compatibility (#459)
1 parent 619c9c2 commit 14c124d

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

adk/pyproject.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,14 @@ dependencies = [
4141
# LLM provider integrations
4242
"litellm>=1.83.7,<2",
4343
"openai-agents>=0.14.3,<0.15",
44-
"openai>=2.2,<3", # Required by openai-agents; litellm now supports openai 2.x (issue #13711 resolved: https://github.com/BerriAI/litellm/issues/13711)
44+
# Cap <2.45: openai 2.45.0 makes InputTokensDetails.cache_write_tokens a
45+
# required field, but openai-agents 0.14.x still builds
46+
# InputTokensDetails(cached_tokens=0) (agents/usage.py), so every
47+
# Runner.run_streamed raises a pydantic ValidationError at context setup.
48+
# openai-agents 0.14.8 is the latest release, so there is no newer version
49+
# to bump to; drop this ceiling once openai-agents ships a fix.
50+
# litellm now supports openai 2.x (issue #13711 resolved: https://github.com/BerriAI/litellm/issues/13711)
51+
"openai>=2.2,<2.45",
4552
"claude-agent-sdk>=0.1.0",
4653
"pydantic-ai-slim>=1.0,<2",
4754
"langgraph-checkpoint>=2.0.0",

uv.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)