chore: drop unused vendor deps from four extensions - #2248
Draft
leepokai wants to merge 1 commit into
Draft
Conversation
gladia_asr_python declared deepgram-sdk==3.9.0 but never imports or references deepgram anywhere, tests included. It is residue from creating the extension off a Deepgram template, and it pulls in httpx, aiohttp, aiofiles, dataclasses-json, aenum, deprecation and typing-extensions for nothing. azure_mllm_python, openai_mllm_python and stepfun_mllm_python each declared pydub==0.25.1 without importing it. glm_mllm_python is the only MLLM extension that actually uses pydub (extension.py:16), so it is deliberately left untouched. Verified by searching every file type in each extension directory, tests included; the only remaining occurrences were the dependency declarations themselves.
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.
Four extensions declare a third-party dependency they never use. This removes
those declarations from both
requirements.txtandpyproject.toml.gladia_asr_pythondeepgram-sdk==3.9.0deepgramanywhere in the directory, tests included. It also pulls inhttpx,aiohttp,aiofiles,dataclasses-json,aenum,deprecationandtyping-extensionsfor nothing.azure_mllm_pythonpydub==0.25.1openai_mllm_pythonpydub==0.25.1stepfun_mllm_pythonpydub==0.25.1glm_mllm_pythonis deliberately left untouched — it is the one MLLM extensionthat genuinely uses pydub (
extension.py:16,from pydub import AudioSegment).That contrast is what makes the removal criterion safe rather than a blanket sweep.
This follows the same direction as #2207, which scoped numpy to the extensions
that actually need it.
Verification
included. The only occurrences of the removed packages were the dependency
declarations themselves.
.pyfile in the four extensions to listthird-party imports and check each against the remaining declared deps. This
is the check that matters for a dependency removal, since an import can be
satisfied only transitively by the package being dropped.
gladia_asr_pythonimportstyping_extensionswithout declaring it, and
deepgram-sdkhad requiredtyping-extensions>=4.9.0.It resolves safely — the import is in
tests/conftest.pyonly, andpydantic(still declared) requires
typing-extensions>=4.14.1.requirements.txtin a clean venv forgladia_asr_pythonand forazure_mllm_python, then executed the imports thecode actually performs.
from typing_extensions import overrideresolves(4.16.0, via pydantic);
aiohttpandpydanticresolve.deepgram,httpxand
pydubare absent, confirming the slimming takes effect.openai_mllm_pythonandstepfun_mllm_pythonhave a post-removalrequirements.txtidentical toazure_mllm_python, so that run covers all three.Not verified
The repository test suite was not run —
task test-extensionneeds theten_agent_devcontainer and Docker was unavailable on this machine. No Pythonsource is touched by this change; it removes four unused dependency
declarations only. Opening as a draft so the extension tests can run in CI
before this is considered ready.