I tried to use google cloud to test gemma4 and compare with the result
of ollama. it had response such as
```json
{"choices":[{"delta":{"content":"Hello","reasoning_content":null,"role":null,"tool_calls":null},"finish_reason":null,"index":0,"logprobs":null,"matched_stop":null}],"created":1778081610,"id":"KV_7adz7Ov20xN8Py-angQ8","model":"google/gemma-4-26b-a4b-it-maas","object":"chat.completion.chunk","usage":{"extra_properties":{"google":{"traffic_type":"ON_DEMAND"}}}}
```
(notice that, while "usage" is present, it does not have any of the
usual value)
Eventually, I had some more issue when parsing the response (unrelated
to this), so I decided to try the google ai endpoint, with its own set
of issue.
Those simple change should only loosen the accepted format, so no new
compatibility error are expected (but I haven’t tried with other
provider)
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [ ] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
(no change)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- Improved open-ai compatibility when token usage info is absent2 files changedLine totals unavailable