Skip to content

feat: update compression response to new API format, add SSL cert fix#11

Merged
SachaMorard merged 3 commits intomainfrom
feat/compression-response
Mar 6, 2026
Merged

feat: update compression response to new API format, add SSL cert fix#11
SachaMorard merged 3 commits intomainfrom
feat/compression-response

Conversation

@SachaMorard
Copy link
Member

Summary

Updates the Python SDK to reflect the new token compression API response format and adds an SSL certificate fix for macOS.

Changes

Compression API Update

  • Removed: input_tokens, rate
  • Added: cost_savings, reduction, time_ms
  • Kept: saved_tokens

SSL Certificate Fix

  • Use certifi's CA bundle when available (fixes SSL: CERTIFICATE_VERIFY_FAILED on macOS with Python.org installs)
  • Add optional edgee[ssl] dependency for certifi
  • Add troubleshooting section to README

Files Updated

  • edgee/__init__.py - Compression model, response parsing, SSL context
  • example/compression.py - Example updated for new fields
  • tests/test_edgee.py - Test mock and assertions
  • README.md - New compression fields, troubleshooting
  • pyproject.toml - Optional ssl dependency

Made with Cursor

@SachaMorard SachaMorard requested a review from a team as a code owner March 6, 2026 07:56
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a952511685

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- Replace input_tokens, rate with saved_tokens, cost_savings, reduction, time_ms
- Use certifi for SSL context when available (fixes cert verification on macOS)
- Add optional edgee[ssl] dependency for certifi
- Update README with new compression fields and troubleshooting section

Made-with: Cursor
@SachaMorard SachaMorard force-pushed the feat/compression-response branch from a952511 to ed9da18 Compare March 6, 2026 08:04
@SachaMorard SachaMorard merged commit a49a457 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.

1 participant