mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
1e04f68745
`streaming_gemini::anthropic_usage_from_gemini` and `transform_gemini::build_anthropic_usage` were byte-for-byte identical (32 lines each) — both converting Gemini `usageMetadata` into the Anthropic `usage` shape including `cache_read_input_tokens` mapping. Promote the non-streaming version to `pub(crate)` and reuse it from the streaming SSE converter. Removes ~30 lines of duplication and guarantees the two paths cannot drift apart. No behavioral change; all 854 lib tests pass; cargo fmt + clippy -D warnings clean.