Skip to content

Gemini fails to decode #283

Open
Open
@gtokman

Description

@gtokman

Describe the bug

When using Gemini flash models the stream is failing to decode. Looks like Gemini ommits a few fields from the response. Should these fields be optional?

  "id": "chatcmpl-B9Yydp5DMEQ0z5Hr7ujy0DqaBGZ2E",
  "service_tier": "default",
  "system_fingerprint": "fp_eb9dce56a8",
{
  "id": "chatcmpl-B9Yydp5DMEQ0z5Hr7ujy0DqaBGZ2E",
  "object": "chat.completion.chunk",
  "created": 1741619103,
  "model": "gpt-4o-2024-08-06",
  "service_tier": "default",
  "system_fingerprint": "fp_eb9dce56a8",
  "choices": [
    {
      "index": 0,
      "delta": {
        "role": "assistant",
        "content": "",
        "refusal": null
      },
      "logprobs": null,
      "finish_reason": null
    }
  ]
}
{
  "choices": [
    {
      "delta": {
        "content": "Hey",
        "role": "assistant"
      },
      "index": 0
    }
  ],
  "created": 1741619073,
  "model": "gemini-2.0-flash-lite",
  "object": "chat.completion.chunk"
}

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