fix(deps): pin openai below 3 - #6831
Merged
Merged
Conversation
azure/responses/llm.py does `from livekit.plugins import openai`, and azure/__init__.py imports that module, so the openai plugin is a hard dependency. It was never declared, so a clean install of the plugin cannot import it. Declare it through the livekit-agents openai extra, the form cerebras, groq, perplexity, sarvam and xai already use.
OpenAI 3 makes HTTPX2 the default client and no longer installs httpx. livekit-agents imports httpx in inference/llm.py, and twelve plugins import it too, none of them declaring it. They all received it through openai, so a fresh install now fails at `import livekit.agents`. Pin openai below 3 to restore that supply. Every openai 2.x still depends on httpx, so this is the whole fix for core and for the plugins. Migrating to HTTPX2 changes the public `timeout: httpx.Timeout` parameter on nine plugin constructors, so it belongs in a minor release rather than here.
baseten/llm.py does `from livekit.plugins.openai import LLM`, and baseten/__init__.py imports that module, so the openai plugin is a hard dependency. It was never declared, so a clean install of the plugin cannot import it. Declare it through the livekit-agents openai extra, matching azure.
davidzhao
approved these changes
Aug 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
OpenAI 3 makes HTTPX2 the default client and no longer installs
httpx.livekit-agentsimportshttpxininference/llm.pyand never declared it. Twelve plugins import it too, and none of them declared it. They all received it throughopenai.That supply is gone, so a fresh install of the current release fails:
Every install since OpenAI 3.0.0 shipped is affected.
Fix
Pin
openaibelow 3. Every openai 2.x release depends onhttpx, so this one line restores the supply for core and for all twelve plugins.A move to HTTPX2 is the durable answer, but it changes the public
timeout: httpx.Timeoutparameter on nine plugin constructors. That belongs in a minor release. #6826 starts this work for the inference client.This branch also corrects two plugins that import the openai plugin and never declared it.
azure/responses/llm.pyandbaseten/llm.pyimport it, and each package imports those modules from its__init__.py, so the dependency is not optional. A clean install of either plugin fails withImportError: cannot import name 'openai' from 'livekit.plugins'. That fault is older than OpenAI 3 and is independent of the pin.