You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add X-Client-Id header with python-sdk-<version> format (#123)
# feat: add X-Client-Id header with python-sdk-<version> format
## Summary
This PR adds automatic inclusion of an `X-Client-Id` header to all API
requests made by the Python SDK. The header value follows the format
`python-sdk-<version>` where version is dynamically imported from
`vlmrun.version.__version__`. The implementation allows users to
override the default header by providing their own `X-Client-Id` in the
request headers.
**Key changes:**
- Import version from `vlmrun.version` for dynamic header value
- Add `X-Client-Id` header to `_request_with_retry` method in
`APIRequestor` class
- Header is only added if not already present, allowing user override
- Uses format `python-sdk-{__version__}` as specified in requirements
## Review & Testing Checklist for Human
- [ ] **Verify version import**: Confirm that
`vlmrun.version.__version__` correctly imports the current SDK version
- [ ] **Test header override**: Verify that providing `X-Client-Id` in
request headers properly overrides the default value
- [ ] **End-to-end API testing**: Make actual API calls and inspect
request headers to ensure `X-Client-Id` appears with correct format
(e.g., `python-sdk-0.3.3`)
- [ ] **Import style check**: Ensure the version import follows the
project's import ordering conventions
### Notes
- This change affects all API requests made through the SDK
- Part of broader effort to add X-Client-Id headers across all VLM Run
SDKs and integrations
- Session:
https://app.devin.ai/sessions/065534cd1a9846fe8e14cd964383de66
- Requested by: @Mirajul-Mohin
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: [email protected] <[email protected]>
0 commit comments