Skip to content

[Bug]: Veo3 model (veo-3.0-generate-preview) uses incorrect endpoint pattern on Vertex AI #14772

Description

@brano-rohlik

Description

LiteLLM is using the wrong endpoint pattern for Google's Veo 3.0 video generation model on Vertex AI. The model requires a special long-running prediction endpoint, not the standard endpoints.predict pattern.

Current Behavior

LiteLLM attempts to call: projects/{PROJECT_ID}/locations/us-central1/endpoints/veo-3.0-generate-preview
Using permission: aiplatform.endpoints.predict

This results in a 403 error:
litellm.BadRequestError: VertexAIException BadRequestError - 403 Permission 'aiplatform.endpoints.predict' denied on resource
'//aiplatform.googleapis.com/projects/{PROJECT_ID}/locations/us-central1/endpoints/veo-3.0-generate-preview' (or it may not exist).

Expected Behavior

Veo 3.0 should use the publishers endpoint with predictLongRunning:
https://us-central1-aiplatform.googleapis.com/v1/projects/{PROJECT_ID}/locations/{LOCATION_ID}/publishers/google/models/veo-3.0-generate-preview:predictLongRunning

Working Example

Here's a working curl command that successfully calls the Veo 3.0 API:

curl -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $(gcloud auth print-access-token)" \
  "https://us-central1-aiplatform.googleapis.com/v1/projects/{PROJECT_ID}/locations/us-central1/publishers/google/models/veo-3.0-generate-preview:predictLongRunning" \
  -d '{
    "instances": [{"prompt": "make video of a dog"}],
    "parameters": {
        "aspectRatio": "16:9",
        "sampleCount": 4,
        "durationSeconds": "8",
        "personGeneration": "allow_all",
        "addWatermark": true,
        "includeRaiReason": true,
        "generateAudio": true,
        "resolution": "720p"
    }
}'

This returns a successful operation ID for the long-running video generation task.

Key Differences

  1. Endpoint path: Uses /publishers/google/models/ instead of /endpoints/
  2. Method: Uses :predictLongRunning instead of standard predict
  3. Permission required: Different from aiplatform.endpoints.predict
  4. Operation type: Returns a long-running operation ID, not immediate results

Environment

  • LiteLLM version: [your version]
  • Model: Veo 3.0 (veo-3.0-generate-preview)
  • Provider: Vertex AI (Google Cloud)

Reproduction Steps

  1. Configure LiteLLM with Vertex AI credentials
  2. Add veo-3.0-generate-preview model with valid service account
  3. Attempt to call the model
  4. Observe 403 permission error despite service account having correct permissions

The service account credentials work perfectly when calling the API directly, confirming this is an implementation issue in LiteLLM's Vertex AI provider for the Veo model specifically.

Relevant log output

litellm.BadRequestError: VertexAIException BadRequestError - 403 Permission 'aiplatform.endpoints.predict' denied on resource '//aiplatform.googleapis.com/projects/gcp-rhl-bi-api-fs8s/locations/us-central1/endpoints/veo-3.0-generate-preview' (or it may not exist). [reason: "IAM_PERMISSION_DENIED"
domain: "aiplatform.googleapis.com"
metadata {
  key: "resource"
  value: "projects/gcp-rhl-bi-api-fs8s/locations/us-central1/endpoints/veo-3.0-generate-preview"
}
metadata {
  key: "permission"
  value: "aiplatform.endpoints.predict"
}
]
stack trace: Traceback (most recent call last):
  File "/usr/lib/python3.13/site-packages/google/api_core/grpc_helpers_async.py", line 85, in __await__
    response = yield from self._call.__await__()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/grpc/aio/_call.py", line 330, in __await__
    raise _create_rpc_error(
    ...<2 lines>...
    )
grpc.aio._call.AioRpcError: <AioRpcError of RPC that terminated with:
	status = StatusCode.PERMISSION_DENIED
	details = "Permission 'aiplatform.endpoints.predict' denied on resource '//aiplatform.googleapis.com/projects/gcp-rhl-bi-api-fs8s/locations/us-central1/endpoints/veo-3.0-generate-preview' (or it may not exist)."
	debug_error_string = "UNKNOWN:Error received from peer ipv4:66.102.1.95:443 {grpc_status:7, grpc_message:"Permission \'aiplatform.endpoints.predict\' denied on resource \'//aiplatform.googleapis.com/projects/gcp-rhl-bi-api-fs8s/locations/us-central1/endpoints/veo-3.0-generate-preview\' (or it may no

Are you a ML Ops Team?

Yes

What LiteLLM version are you on ?

v1.77.2

Twitter / LinkedIn details

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions