-
Notifications
You must be signed in to change notification settings - Fork 1
sent sdk version in headers #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -4,6 +4,8 @@ | |||
| import httpx | ||||
| from attrs import define, evolve, field | ||||
|
|
||||
| from fishjam.version import get_version | ||||
|
|
||||
|
|
||||
| @define | ||||
| class Client: | ||||
|
|
@@ -229,6 +231,7 @@ def get_httpx_client(self) -> httpx.Client: | |||
| self._headers[self.auth_header_name] = ( | ||||
| f"{self.prefix} {self.token}" if self.prefix else self.token | ||||
| ) | ||||
| self._headers["x-sdk_version"] = f"py-{get_version()}" | ||||
|
||||
| self._headers["x-sdk_version"] = f"py-{get_version()}" |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new SDK version header functionality lacks test coverage. Similar header functionality in the codebase (e.g., x-goog-api-client in test_gemini.py) has comprehensive tests. Consider adding tests that verify the SDK version header is correctly set in both sync and async HTTP clients.
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The header name uses an underscore in "x-sdk_version" which is inconsistent with HTTP header naming conventions. HTTP headers should use hyphens as separators. Change to "x-sdk-version" to follow standard conventions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The header name uses an underscore in "x-sdk_version" which is inconsistent with HTTP header naming conventions. HTTP headers should use hyphens as separators. Change to "x-sdk-version" to follow standard conventions.