Rajat Vig 34871c59e3
fix: handle missing fields in Vertex AI Gemini completions responses (#1465)
## Summary
Gemini's OpenAI-compatible endpoint intermittently omits `message` from
choices and `completion_tokens`/`prompt_tokens` from usage. Add instead
of returning 503. Follows the same pattern as #977.

- Add `#[serde(default)]` to `Choice.message` and `Usage` token count
fields in `completions.rs`
- Derive `Default` on `ResponseMessage` and `Usage` so missing fields
deserialize to zero/empty values
- Add test that verifies deserialization succeeds when Gemini omits
these fields

Fixes #1464

---------

Signed-off-by: Rajat Vig <rvig@etsy.com>
2026-04-08 14:22:24 -07:00
..
2026-03-30 14:50:23 -07:00
2026-03-30 14:50:23 -07:00
2026-02-10 14:28:04 -08:00
2026-01-29 11:04:52 -08:00
2026-03-30 14:50:23 -07:00