adk-python icon indicating copy to clipboard operation
adk-python copied to clipboard

Allow openai 3.x in the openai extra (currently openai>=2.20,<3)

Open rcleveng opened this issue 2 weeks ago • 2 comments

TLDR

google-adk 2.14.0 declares openai>=2.20,<3 in its openai, extensions, all and test extras. That cap stops projects from installing ADK's OpenAI integration alongside packages that now require openai 3.

Is your feature request related to a specific problem?

Impact on your work

Why this blocks us: We use google-adk[openai] (google.adk.integrations.openai.OpenAILlm) in the same environment as livekit-agents. Every livekit-agents release from 1.8.7 on requires openai>=3.19,<4. Releases up to 1.8.6 cap opentelemetry-api/opentelemetry-sdk below 1.45, which other dependencies (for example langfuse>=5) now need. So no version of livekit-agents can be installed with google-adk[openai] and current OpenTelemetry, and resolution fails:

google-adk[openai]>=2.14.0 depends on openai>=2.20,<3 livekit-agents>=1.8.7 depends on openai>=3.19 livekit-agents>=1.6.8,<=1.8.6 depends on opentelemetry-api>=1.39.0,<1.45 langfuse>=5.2.0 depends on opentelemetry-api>=1.45.0

What changed in openai 3: The 3.0.0 changelog lists one breaking change: HTTPX2 is now the default HTTP client, and httpx is no longer installed automatically. Its migration guide says parsed response models and the exception classes are unchanged. The changes it describes concern custom http_client/transport objects and httpx.Timeout values, which must become their httpx2 equivalents.

What we tested: With a dependency override, we ran OpenAILlm on openai==3.46.0 against a mocked Chat Completions endpoint. Both normal and streaming generate_content_async calls returned the expected LlmResponse content. We have not checked OpenAIResponsesLlm, AzureOpenAIResponsesLlm or OpenAIDecisionsClassifier. openai 3.37.0 also changed a Decisions type: question.instructions can now be a string or a list of structured parts. The classifier passes question.instructions to its _render helper, so it may need checking.

Describe the Solution You'd Like

Request: Widen the extras to openai>=2.20,<4 (or >=3,<4) once the integration is verified on 3.x. If ADK builds its own httpx client or Timeout for the OpenAI SDK anywhere, that code would need to move to httpx2.

Environment: Python 3.14, google-adk 2.14.0, openai 3.46.0, livekit-agents 1.8.11.

Willingness to contribute

Yes, can send a PR, but the real effort is making sure nothing regresses as new development happens.

rcleveng avatar Nov 11 '26 19:11 rcleveng

Hi @rcleveng, thank you for raising this feature request. We noticed that PR #8104 has already been opened to address it. Could you please confirm if this is the solution you are looking for, so we can proceed with the review?

sanketpatil06 avatar Nov 13 '26 17:11 sanketpatil06

Hi @rcleveng, thank you for raising this feature request. We noticed that PR #8104 has already been opened to address it. Could you please confirm if this is the solution you are looking for, so we can proceed with the review?

Yes that's perfect.

rcleveng avatar Nov 13 '26 18:11 rcleveng