Skip to content

Bug: Failed to parse Gemini CLI stats due to Schema change (expected string, found sequence) #137

@khangaiNgaan

Description

@khangaiNgaan

Describe the bug

Recent updates to the Gemini CLI have changed the JSON structure of the chat sessions. The content field in the message object has changed from a simple String to an Array of Objects. This causes Splitrail's parser to fail with the following error:

Serde("invalid type: sequence, expected a string") at character 0

To Reproduce

  1. Use the latest version of Gemini CLI to generate some chat history.
  2. Run splitrail.
  3. See the error in the terminal.

Expected behavior

Splitrail should handle both the legacy string format and the new multi-modal array format for the content field.

Detailed comparison

  • Previous format (Working):

    "type": "user",
    "content": "my prompt..."
  • Current format (Breaking):

    "type": "user",
    "content": [
      {
        "text": "my prompt..."
      }
    ]
  • Gemini Response:

    "type": "gemini",
    "content": "response..."

Environment:

  • OS: macOS Sequoia 15.7.4
  • Splitrail version: 3.3.5
  • Gemini CLI version: 0.35.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions