Skip to content

[Bug]: Errors while using VertexAI Claude models in Codex CLI #22312

@ashaka-netapp

Description

@ashaka-netapp

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

Encountering below errors while using VertexAI Claude models in Codex CLI

  • Vertex_aiException BadRequestError -
    b'{"type":"error","error":{"type":"invalid_request_error","message":"messages: text content blocks must be non-
    empty"},"request_id":"req_vrtx_011CYZCM5xwFNPwMuJndurak"}'. Received Model Group=claude-sonnet-4.5\nAvailable Model Group
    Fallbacks=None","type":null,"param":null,"code":"400"}}

  • Vertex_aiException BadRequestError - Failed to parse tool call arguments for tool 'shell' (Anthropic tool invoke). Error: Expecting ',' delimiter: line 1 column 99 (char 98).
    Arguments: {"command": ["bash","-lc","find /x/repos/playground -name 'messages.py' -type f"]\nReceived
    Messages= ....
    (Possibly, the nested quotes are causing truncation)

Validation and sanitization when translating requests between different providers’ APIs need to be strengthened.

Steps to Reproduce

  1. Configure Codex CLI to use VertexAI Claude models and use prompts triggering tool calls

Relevant log output

What part of LiteLLM is this about?

Proxy

What LiteLLM version are you on ?

v.1.81.14

Twitter / LinkedIn details

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions