Skip to content

prewarm LLM to skip connection establishment - #6484

Merged
davidzhao merged 2 commits into
mainfrom
dz/prewarm
Jul 24, 2026
Merged

prewarm LLM to skip connection establishment#6484
davidzhao merged 2 commits into
mainfrom
dz/prewarm

Conversation

@davidzhao

Copy link
Copy Markdown
Member

warms up DNS + TLS cache/handshakes before the first LLM request is sent

warms up DNS + TLS cache/handshakes before the first LLM request is sent
@davidzhao
davidzhao requested a review from a team as a code owner July 18, 2026 22:41

@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

Comment thread livekit-agents/livekit/agents/voice/agent_session.py Outdated
Comment thread livekit-agents/livekit/agents/voice/agent_session.py

self._prewarm_task = asyncio.create_task(_prewarm())

async def _prewarm_impl(self) -> None:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Q: should we add support for FallbackAdapter?

Comment thread livekit-agents/livekit/agents/voice/agent_session.py Outdated
async def _prewarm() -> None:
try:
await self._prewarm_impl()
except Exception:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we clear the _prewarm_task here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't think we would? if this has failed, we'd just wait for normal cleanup?

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@davidzhao
davidzhao merged commit b418cf0 into main Jul 24, 2026
24 checks passed
@davidzhao
davidzhao deleted the dz/prewarm branch July 24, 2026 05:43
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.

3 participants