No new usage record is created — Antigravity usage statistics are missing
Quick fix
Most related issues remain unresolved. Upgrade to a cc-switch version containing the #7740 fix for Gemini streaming usage parsing and model attribution.
Symptom
Section titled “Symptom”No new usage record is created for the successful streaming request.Antigravity’s native Gemini streaming request `streamGenerateContent` can be forwarded successfully, but cc-switch does not write the corresponding usage record. The reported logs show no `[response_processor]` or `[gemini] 插入日志` entry after the stream ends.
The maintainers confirmed two defects: the streaming pre-filter only passes through events containing `usageMetadata`, while `modelVersion` appears only in the first chunk; also, `usageMetadata` token counts returned by Vertex AI may be strings, and when `as_u64()` cannot parse them, no record is visible on the statistics page. Both issues are addressed in the fix described in #7740. If the upstream stream does not pass through `usageMetadata` at all, the proxy-side behavior still needs to be confirmed.
Upgrade cc-switch to a version containing the #7740 fix; the issue does not specify a release version.
After upgrading, resend an Antigravity `streamGenerateContent` request and check for the corresponding usage log and statistics record.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 1 real issues
- What should I confirm after upgrading?
- Capture a `streamGenerateContent` usage row again and confirm that the streaming request produced a statistics record.
- What if the stream has no `usageMetadata` chunk at all?
- This may happen when New API records usage for some upstreams but does not pass the usage data through. Confirm this further on the proxy side.
Related problems
Section titled “Related problems”This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.