Skip to content

API error messages displayed as raw byte codes instead of decoded text when model capacity is exhausted #19851

@Rohan-Mohite14

Description

@Rohan-Mohite14

What happened?

When the Gemini CLI receives a 429 RESOURCE_EXHAUSTED error from the API, the error message is displayed as comma-separated numeric byte values instead of human-readable text.

Example output from gemini-cli:

[API Error:
91,123,10,32,32,34,101,114,114,111,114,34,58,32,123,10,...
]

This appears to be the raw byte representation of the API response body, likely returned as a Uint8Array, which is not decoded before being displayed.

This makes the error message unreadable and difficult to understand.

What did you expect to happen?

The error message should be decoded from UTF-8 and displayed as readable text.

Example expected output:

[API Error: No capacity available for model gemini-3-flash-preview on the server]

or the formatted error JSON/message returned by the API.

Client information

Client Information
Gemini CLI Version: 0.30.0-nightly.20260210.a2174751d
Git Commit: acb7f577d
Model: Auto (Gemini 3)
Sandbox: no sandbox
OS: darwin (macOS)
Auth Method: Logged in with Google (Google One AI Pro)
Tier: Gemini Code Assist in Google One AI Pro

Login information

No response

Anything else we need to know?

Screenshot showing the issue:

Image

The API error message is displayed as raw byte values instead of readable text.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/coreIssues related to User Interface, OS Support, Core Functionalityhelp wantedWe will accept PRs from all issues marked as "help wanted". Thanks for your support!priority/p1Important and should be addressed in the near term.type/bug

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions