gemini-cli/packages/server
Taylor Mullen 4d5f0dc080 Workaround model bug where it returns invalid history items.
- Currently there's a bug in the API (or SDK?) where the SDK endpoint will commonly fail with:

```
Error: Failed to generate JSON content: got status: 400 Bad Request. {"error":{"code":400,"message":"* GenerateContentRequest.contents[5].parts: contents.parts must not be empty.\n","status":"INVALID_ARGUMENT"}}
```

- At times the model will respond with an empty parts list where if we send that back up to the API endpoint it explodes with the above. Using a curated history seems like a total hack around this prolbem, and even in the SDK (i'm following up on this), BUT helps mitigate this issue.
2025-05-11 13:01:54 -07:00
..
src Workaround model bug where it returns invalid history items. 2025-05-11 13:01:54 -07:00
README.md infra: add multipackage support (#34) 2025-04-18 14:37:02 -07:00
index.ts refactor: clean up build output (#53) 2025-04-20 12:33:39 -07:00
package.json Continue to work through 429/500s. 2025-05-07 16:38:06 -07:00
tsconfig.json enable json imports (#165) 2025-04-24 18:30:19 -07:00

README.md

Nested package template. Either fill this out with "backend" functionality or create similar packages that you want built separate from the CLI.

To use this package from another dependent package in this monorepo:

  1. add "@gemini-code/server" to the dependent package's package.json
  2. import in a dependenant by calling import { } from "@gemini-code/server"