BerriAI/litellm · error · ValueError

No operation name in Veo edit response: {response_data}

Error message

No operation name in Veo edit response: {response_data}

What it means

Raised by the Veo edit response transform when the parsed response JSON has no 'name' field. A successful predictLongRunning edit must return an operation name (projects/.../operations/ID) which becomes the new video id used for polling; absence means the call did not return an operation at all — typically an auth/quota/endpoint error body.

Source

Thrown at litellm/llms/vertex_ai/videos/transformation.py:752

        raw_response: httpx.Response,
        logging_obj: LiteLLMLoggingObj,
        custom_llm_provider: str | None = None,
        request_data: dict | None = None,
    ) -> VideoObject:
        """
        Transform the Veo video edit response.

        Veo returns the same operation response as video generation:
        {"name": "projects/.../operations/OPERATION_ID"}

        usage includes duration_seconds and optional video_resolution from the
        edit request parameters for cost calculation.
        """
        response_data: Final = _parse_veo_operation(raw_response)

        operation_name: Final = response_data.get("name")
        if not operation_name:
            raise ValueError(f"No operation name in Veo edit response: {response_data}")

        model: Final = self.extract_model_from_operation_name(operation_name) or ""

        if custom_llm_provider:
            video_id = encode_video_id_with_provider(operation_name, custom_llm_provider, model)
        else:
            video_id = operation_name

        video_obj: Final = VideoObject(
            id=video_id,
            object="video",
            status="processing",
            model=model,
        )
        video_obj.usage = _build_vertex_video_usage_from_request_data(request_data)
        return video_obj

    def transform_video_extension_request(

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Log raw_response.text to see the actual error body Google returned
  2. Verify Vertex AI credentials (gcloud auth, service account JSON) and that aiplatform.googleapis.com is enabled
  3. Check the model id and that you are calling a model which supports editing (e.g. veo variants)
  4. Confirm no custom api_base/proxy is rewriting the predictLongRunning path

Example fix

# before
result = litellm.video_edit(video_id=vid, prompt="...", custom_llm_provider="vertex_ai")

# after (debug the raw body first)
try:
    result = litellm.video_edit(video_id=vid, prompt="...", custom_llm_provider="vertex_ai")
except ValueError as e:
    print(response_body_if_available)  # or re-issue the POST with httpx to inspect .text
    raise
Defensive patterns

Strategy: try-catch

Validate before calling

def veo_edit_response_has_operation(response_json: dict) -> bool:
    return isinstance(response_json.get("name"), str) and "operations/" in response_json["name"]

if not veo_edit_response_has_operation(resp.json()):
    raise RuntimeError(f"edit call did not return an operation: {resp.text}")

Type guard

def is_veo_operation_response(data: object) -> bool:
    return isinstance(data, dict) and isinstance(data.get("name"), str)

Try / catch

try:
    result = litellm.video_edit(video_id=vid, prompt=p, custom_llm_provider="vertex_ai")
except ValueError as e:
    if "No operation name in Veo edit response" in str(e):
        # upstream returned an error body: re-issue with httpx or check creds/quota
        raise RuntimeError(f"veo edit rejected: likely auth/quota — check credentials") from e
    raise

Prevention

When it happens

Trigger: The edit POST returns a JSON error body (401/403/429 style) instead of an operation, or the endpoint URL/model in the transformed request is wrong, so _parse_veo_operation yields a dict without 'name'.

Common situations: Expired or missing Vertex credentials; malformed api_base overriding the predictLongRunning URL; model name typos returning a 404 body; quota errors with JSON payloads.

Related errors


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/428d87af8a35e775. Report an issue: GitHub.