Skip to content

fix(plugins): declare undeclared imports, cap openai below 3 - #6830

Closed
longcw wants to merge 1 commit into
chenghao/fix/AGT-3286-declare-httpx-dependencyfrom
longc/declare-httpx
Closed

fix(plugins): declare undeclared imports, cap openai below 3#6830
longcw wants to merge 1 commit into
chenghao/fix/AGT-3286-declare-httpx-dependencyfrom
longc/declare-httpx

Conversation

@longcw

@longcw longcw commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Stacked on #6826.

What breaks

Twelve plugins import httpx at module level and never declare it. They received it from livekit-agents, which received it from openai.

OpenAI 3 moved to HTTPX2 and no longer installs httpx. #6826 corrects livekit-agents. The plugins still fail.

With #6826 applied, a clean install gives this result:

import livekit.agents          → OK
import livekit.plugins.openai  → ModuleNotFoundError: No module named 'httpx'

What this changes

Declare httpx in the twelve plugins that import it.

Cap openai below 3 in the plugins that give a legacy httpx client to an openai client. OpenAI 3 accepts such a client at runtime, but its type annotations reject it. A move to HTTPX2 changes public constructor signatures, so it belongs in a separate change.

Declare three more imports that no package listed. The google plugin imports openai in aiplatform_llm.py. The azure and baseten plugins import the openai plugin. All three fail on a clean install today, with or without OpenAI 3.

Twelve plugins import httpx at module level without declaring it. They relied
on livekit-agents pulling it in through openai. OpenAI 3 moved to HTTPX2, so
that supply disappears and every one of those plugins fails to import.

Declare httpx where it is imported. Cap openai below 3 in the plugins that hand
a legacy httpx client to an openai client, which OpenAI 3 accepts at runtime but
rejects at type-check time.

Three more packages import something they never listed: google imports openai in
aiplatform_llm.py, and azure and baseten import the openai plugin. Those three
fail to import on a clean install today, with or without OpenAI 3.
@longcw
longcw requested a review from a team as a code owner August 13, 2026 01:20
@longcw longcw closed this Aug 13, 2026

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@longcw
longcw deleted the longc/declare-httpx branch August 13, 2026 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant