Skip to content

fix(google): preserve request timeout with http options#5976

Merged
davidzhao merged 1 commit into
livekit:mainfrom
he-yufeng:fix/google-http-options-timeout
Jun 8, 2026
Merged

fix(google): preserve request timeout with http options#5976
davidzhao merged 1 commit into
livekit:mainfrom
he-yufeng:fix/google-http-options-timeout

Conversation

@he-yufeng

Copy link
Copy Markdown
Contributor

Summary

  • preserve conn_options.timeout when callers pass custom Google http_options
  • copy request-local HTTP options before adding LiveKit headers, avoiding mutation of the caller's object
  • add a Google LLM regression test for custom headers plus fallback timeout propagation

Fixes #5972

To verify

  • PYTHONPATH=livekit-agents;livekit-plugins\livekit-plugins-google python -m pytest tests\test_plugin_google_llm.py::TestCachedContentRequestSuppression::test_request_merges_timeout_into_caller_http_options tests\test_plugin_google_llm.py::TestCachedContentRequestSuppression::test_request_includes_system_instruction_and_tools_when_no_cache -q
  • python -m py_compile livekit-plugins\livekit-plugins-google\livekit\plugins\google\llm.py tests\test_plugin_google_llm.py
  • python -m ruff check livekit-plugins\livekit-plugins-google\livekit\plugins\google\llm.py tests\test_plugin_google_llm.py
  • python -m ruff format --check livekit-plugins\livekit-plugins-google\livekit\plugins\google\llm.py tests\test_plugin_google_llm.py
  • git diff --check

Local test environment note: upgraded livekit-protocol to the project-declared >=1.1.13 and installed the Google plugin's declared speech/texttospeech dependencies so the existing Google plugin tests could import cleanly.

@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

@davidzhao davidzhao merged commit 5b9c358 into livekit:main Jun 8, 2026
17 checks passed
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.

livekit-plugins-google: caller-set http_options silently drops conn_options.timeout (disables FallbackAdapter timeout)

2 participants