litellm - 💡(How to fix) Fix Vertex AI Live WebSocket Passthrough returns 1011 "Vertex AI authentication failed" even when model is added via dashboard with service account JSON [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#22962Fetched 2026-04-08 00:39:16
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
labeled ×1

Error Message

websockets.exceptions.ConnectionClosedError: received 1011 (internal error) Vertex AI authentication failed; then sent 1011 (internal error) Vertex AI authentication failed

Root Cause

Root cause (discovered via local testing): The /vertex_ai/live WebSocket passthrough does not use credentials stored per-model via the dashboard. It requires default_vertex_config to be explicitly set in config.yaml: litellm_settings: default_vertex_config: vertex_project: "your-project-id" vertex_location: "us-central1" vertex_credentials: "/path/to/acd.json"

RAW_BUFFERClick to expand / collapse

What I did:

Added vertex_ai/gemini-live-2.5-flash-native-audio via the LiteLLM dashboard UI, uploading a GCP service account JSON (acd.json) during model setup Created an API key scoped to this model Connected to the WebSocket passthrough endpoint: import asyncio import json import websockets import ssl

PROXY_URL = "wss:///vertex_ai/live?project_id=&location=us-central1" API_KEY = "sk-xxxx"

async def main(): ssl_ctx = ssl.create_default_context() ssl_ctx.check_hostname = False ssl_ctx.verify_mode = ssl.CERT_NONE

async with websockets.connect( PROXY_URL, additional_headers={"Authorization": f"Bearer {API_KEY}"}, ssl=ssl_ctx ) as ws: await ws.send(json.dumps({ "setup": { "model": "projects/<project-id>/locations/us-central1/publishers/google/models/gemini-live-2.5-flash-native-audio", "generation_config": {"response_modalities": ["AUDIO"]} } })) response = await ws.recv() print(response) asyncio.run(main())

What I expected: The WebSocket passthrough should use the service account JSON uploaded via the dashboard to authenticate with Vertex AI and return setupComplete.

What actually happened: websockets.exceptions.ConnectionClosedError: received 1011 (internal error) Vertex AI authentication failed; then sent 1011 (internal error) Vertex AI authentication failed

Root cause (discovered via local testing): The /vertex_ai/live WebSocket passthrough does not use credentials stored per-model via the dashboard. It requires default_vertex_config to be explicitly set in config.yaml: litellm_settings: default_vertex_config: vertex_project: "your-project-id" vertex_location: "us-central1" vertex_credentials: "/path/to/acd.json"

When this is added locally and LiteLLM is restarted, the connection works perfectly.

extent analysis

Fix Plan

To resolve the issue, you need to configure the default_vertex_config in your config.yaml file. Here are the steps:

  • Add the following configuration to your config.yaml file:
litellm_settings:
  default_vertex_config:
    vertex_project: "your-project-id"
    vertex_location: "us-central1"
    vertex_credentials: "/path/to/acd.json"
  • Replace "your-project-id" with your actual GCP project ID.
  • Replace "/path/to/acd.json" with the actual path to your service account JSON file (acd.json).
  • Restart the LiteLLM service to apply the changes.

Verification

After applying the fix, you can verify that the WebSocket passthrough connection works by running your Python script again:

import asyncio
import json
import websockets
import ssl

# ... (rest of the code remains the same)

If the connection is successful, you should receive a setupComplete response from the Vertex AI API.

Extra Tips

  • Make sure to keep your service account JSON file secure and do not commit it to version control.
  • If you are using a different location or project ID, update the vertex_location and vertex_project fields accordingly.
  • If you encounter any further issues, check the LiteLLM logs for error messages and verify that the default_vertex_config is correctly set in your config.yaml file.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

litellm - 💡(How to fix) Fix Vertex AI Live WebSocket Passthrough returns 1011 "Vertex AI authentication failed" even when model is added via dashboard with service account JSON [1 participants]