feat: update X-Client-Info to use structured semicolon-delimited metadata#1479
Draft
feat: update X-Client-Info to use structured semicolon-delimited metadata#1479
Conversation
…data
Consolidate platform and runtime metadata into the X-Client-Info header
using semicolon-delimited key=value pairs instead of separate standalone
headers.
New format:
X-Client-Info: supabase-py/<component> v<version>; platform=<OS>; platform-version=<release>; runtime=python; runtime-version=<python-version>
This avoids adding new headers that would be breaking changes in Edge
Functions (where CORS allowed-headers must be explicitly listed), while
keeping all metadata within the already-allowed X-Client-Info header.
Removes: X-Supabase-Client-Platform, X-Supabase-Client-Platform-Version,
X-Supabase-Client-Runtime, X-Supabase-Client-Runtime-Version
Linear: SDK-904
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Python 3.14 reports version strings like '3.14.0b4', which broke [\d.]+ matches. Use \S+ to accept any non-whitespace version string. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
X-Client-Infoheader using semicolon-delimitedkey=valuepairsX-Supabase-Client-*headers in favor of inline structured metadataNew format:
Why: Adding new headers is a breaking change for supabase-js in Edge Functions because users must explicitly allow headers in CORS config. Since
X-Client-Infois already allowed everywhere, embedding metadata there avoids that problem — matching the approach used in supabase-swift.Changes
_async,_sync): Replaced 5-header dict with structuredX-Client-Info_async,_sync): Same_async,_sync): Same_async,_sync): SameTesting
New tests added (all passing)
TestXClientInfo::test_structured_metadata_format— verifies regex pattern matchTestXClientInfo::test_no_separate_platform_headers— verifies removed headers are absentTest results
Acceptance Criteria
X-Client-Infocontainsplatform,platform-version,runtime,runtime-versionas semicolon-delimited key=value pairsX-Supabase-Client-*headers are removedLinear Issue
Closes: SDK-904
🤖 Generated with Claude Code
/take