Skip to content

docs: fix integration pages for compression and tags headers#133

Merged
SachaMorard merged 1 commit intomainfrom
docs/fix-integration-compression-headers
Feb 5, 2026
Merged

docs: fix integration pages for compression and tags headers#133
SachaMorard merged 1 commit intomainfrom
docs/fix-integration-compression-headers

Conversation

@SachaMorard
Copy link
Member

Summary

Fixes integration documentation for OpenAI SDK, Anthropic SDK, Claude Code, and Langchain to correctly document compression and tags configuration via HTTP headers.

Changes

Fixed Incorrect Response Field References

  • OpenAI SDK: Removed completion.compression references - this field doesn't exist in the OpenAI SDK response
  • Anthropic SDK: Removed message.compression references - this field doesn't exist in the Anthropic SDK response
  • Both SDKs use standard response formats and don't include Edgee's custom compression field

Added Compression Headers Documentation

All integration pages now document how to control compression via HTTP headers:

  • OpenAI SDK: Added "Compression & Tags via Headers" section with TypeScript and Python examples
  • Anthropic SDK: Added "Compression & Tags via Headers" section with TypeScript and Python examples
  • Claude Code: Updated to show compression headers in settings and environment variables
  • Langchain: Added new section showing compression and tags with default_headers

Headers Documented

Header Type Description
x-edgee-enable-compression "true" or "false" Enable token compression (overrides console settings)
x-edgee-compression-rate string Target compression rate (0.0-1.0, default 0.75)
x-edgee-tags string Comma-separated tags for analytics and filtering

Updated Examples

  • Changed from showing non-existent compression response fields to showing standard token usage
  • Added combined examples showing compression + tags configuration
  • Updated notes to direct users to the Edgee dashboard for compression metrics

Impact

Users can now properly configure compression and tags when using third-party SDKs (OpenAI, Anthropic, Claude Code, Langchain) with Edgee. Previous documentation incorrectly suggested accessing compression fields that don't exist in these SDKs' response objects.

Testing

  • Verified all code examples use correct SDK response field names
  • Confirmed compression headers match Edgee API specification
  • Checked that tags header format is consistent across all pages

🤖 Generated with Claude Code

- Remove incorrect compression response field references from OpenAI and Anthropic SDK docs
- Add compression headers documentation (x-edgee-enable-compression, x-edgee-compression-rate)
- Document tags header (x-edgee-tags) for all integrations
- Update token usage examples to use standard SDK response fields
- Add compression configuration sections to Claude Code and Langchain pages

Fixes: OpenAI and Anthropic SDKs don't have compression field in responses
Adds: Header-based compression and tags configuration for all third-party integrations

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@SachaMorard SachaMorard merged commit dd784db into main Feb 5, 2026
2 checks passed
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