Repository navigation
fix(google): use role=system for Vertex update_instructions - #7802
Conversation
|
Note: this branch is based on a slightly stale fork tip (behind |
There was a problem hiding this comment.
🔍 Devin Review: 1 flag
Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
|
@Li-john1021 can you please fix the failing test here |
|
@rajgarg021 Thanks for the ping — happy to help. The red check is I've re-triggered the failed unit-tests job. The branch is also a bit behind |
|
Follow-up: I pushed a small commit to retrigger checks, but Actions did not start on the new head (likely waiting on workflow approval for the fork PR, or the branch being behind |
|
@russellmartin-livekit @longcw could one of you please help unblock this? I opened #7785. Thanks @Li-john1021 for picking this up. Why it's stuck:
@Li-john1021 can't push a rebase (their token lacks the
Happy to do option 2 right away if that's easier. |
7064eda to
2fafd71
Compare
|
@rajgarg021 Thanks again for the clear write-up — that helped a lot. I've rebased / resolved against current
GitHub now reports the PR as mergeable. My token still can't sync the fork / approve workflow runs, so if checks stay pending, an Update branch (or approving workflows) on your side would be much appreciated. Happy to take any further feedback — and option 2 is still fine with me if you'd rather land a clean maintainer PR. |
2fafd71 to
c8a5616
Compare
|
Sorry about the ruff F811 failure — a rebase left a duplicate |
On Vertex AI Live, mid-session update_instructions() now sends role="system" so the server replaces the system instruction. The Gemini API path keeps role="model" (it still rejects role="system"). Fixes livekit#7785.
6291bed to
7edefc9
Compare
|
Thank you @davidzhao for the review and for merging this — much appreciated. And thanks again to @rajgarg021 for the clear repro and proposed fix on #7785. |
Summary
update_instructions()now sendsrole="system"so the server replaces the system instruction (per Vertex docs).role="model"(it still rejectsrole="system").Thanks to @rajgarg021 for the clear repro and proposed fix.
Test plan
pytest tests/test_plugin_google_realtime.py::test_update_instructions_role_for_api -v --unit(2 passed: Vertex →system, Gemini →model)model_api_compatibility,tool_response_carries_the_call_id) still pass (13 selected passed)