Repository navigation
fix(llm): drop the dangling openai.responses entry from _provider_format.__all__ - #8008
Merged
Merged
Conversation
…mat.__all__ `openai.responses` is a provider-format name accepted by `ChatContext.to_provider_format`, not a submodule: the Responses converters live in `_provider_format.openai`. Listing it in `__all__` made `from livekit.agents.llm._provider_format import *` raise AttributeError. Add a unit test that star-imports every livekit.agents package that defines `__all__`, so a dangling entry anywhere in the package fails CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
longcw
approved these changes
Oct 22, 2026
longcw
left a comment
Contributor
There was a problem hiding this comment.
_provider_format is a private package, though, and nothing should star-import it. Please drop tests/test_package_exports.py.
_provider_format is private and nothing star-imports it, as requested in review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Dropped |
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
A star import of the provider-format package fails:
Root cause
#4192 added
"openai.responses"to_provider_format.__all__. Butopenai.responsesis a format name thatChatContext.to_provider_formatandToolContext.parse_function_toolsaccept, not a submodule:_provider_format/openai.pyis a single module, and the Responses converters (to_responses_chat_ctx,to_responses_fnc_ctx) live inside it. A star import looks up every__all__entry on the package, so the dotted name raises. Tools that read__all__, such as docs builds, get the bad name too.This is the same class of bug as #7894 and #7981.
Fix
"openai.responses"from__all__. The"openai.responses"format still works; nothing that dispatches on it changes.tests/test_package_exports.py, which star-imports everylivekit.agentspackage that defines__all__(30 packages), so a dangling entry anywhere in the core package now fails the unit gate.Tests
test_star_import_resolves_every_all_entry[livekit.agents.llm._provider_format]fails onmainwith the AttributeError above; the other 29 packages pass on both.I also star-imported every plugin package. The only failures are aws, azure and nvidia, which raise the intended "install the optional extra" ImportError for their realtime modules, so I kept the new test to
livekit.agents.🤖 Generated with Claude Code