Skip to content

[Epic] Robust API Response Parsing and Defensive Implementation #20193

@sehoon38

Description

@sehoon38

Overview

Recent production issues highlighted fragility in how the Gemini CLI parses backend API responses. Specifically, changes in internal proto definitions that added new metadata-only messages (e.g., credit consumption) caused client-side crashes because the CLI assumed certain fields (like `candidates`) would always be present.

This epic tracks the work to move toward a "defensive by default" parsing strategy, ensuring the CLI is resilient to backend changes and providing better visibility into parsing failures.

Goals

  • Ensure all API response fields are handled as optional.
  • Enforce optionality via type-checking or linting.
  • Improve observability and alerting for parsing errors.
  • Enhance testing (Integration & Fuzzing) to catch edge cases.

Metadata

Metadata

Assignees

Labels

area/platformIssues related to Build infra, Release mgmt, Testing, Eval infra, Capacity, Quota mgmtworkstream-rollupLabel used to tag epics and features that are associated with one of the three primary workstreams🔒 maintainer only⛔ Do not contribute. Internal roadmap item.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions