Skip to content

feat: update compression response to new API format#9

Merged
SachaMorard merged 1 commit into
mainfrom
feat/compression-response
Mar 6, 2026
Merged

feat: update compression response to new API format#9
SachaMorard merged 1 commit into
mainfrom
feat/compression-response

Conversation

@SachaMorard

Copy link
Copy Markdown
Member

Summary

Updates the Go SDK to reflect the new token compression API response format.

Changes

Compression API Update

  • Removed: InputTokens, Rate
  • Added: CostSavings, Reduction, TimeMs
  • Kept: SavedTokens
  • Note: Reduction is float64 (API returns fractional percentages)

Files Updated

  • edgee/edgee.go - Compression struct
  • example/compression/main.go - Example updated for new fields
  • edgee/edgee_test.go - Test mock and assertions
  • README.md - New compression fields

Made with Cursor

- Replace InputTokens, Rate with SavedTokens, CostSavings, Reduction, TimeMs
- Use float64 for Reduction (API returns fractional percentages)
- Update example, README, and tests

Made-with: Cursor
@SachaMorard SachaMorard force-pushed the feat/compression-response branch from d846ba2 to 80dd404 Compare March 6, 2026 08:10
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@SachaMorard SachaMorard requested a review from a team March 6, 2026 08:55
@SachaMorard SachaMorard merged commit b05f098 into main Mar 6, 2026
1 check passed
@SachaMorard SachaMorard deleted the feat/compression-response branch March 6, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants