Skip to content

Bump extension REST client LD-API-Version to 20240415 - #170

Merged
Andrewjeska merged 1 commit into
mainfrom
fix/api-version-header
Sep 3, 2026
Merged

Bump extension REST client LD-API-Version to 20240415#170
Andrewjeska merged 1 commit into
mainfrom
fix/api-version-header

Conversation

@claude

@claude claude Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Requested by Leo Byeon, Michael Anderjaska · Slack thread

Before: The extension's REST client sends LD-API-Version: 20220603 on every request (src/api.ts). Because a request-level version header overrides the account/token default, any user on extension v4.0.0+ appears in the old-version API usage report even when their tokens default to a newer version.

After: The client sends LD-API-Version: 20240415, matching current API tooling, so it no longer forces users onto an old version. The beta code path is unchanged.

One-line summary: bump the single hardcoded non-beta LD-API-Version literal from 20220603 to 20240415.

Fixes #169.

Note: this PR does not change the bundled ld-find-code-refs version (src/coderefs/codeRefsVersion.ts still pins 2.11.4, which sends 20210729); bumping the bundled binary is a separate change and left to the team's judgement.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PAYYUEHtAerrpz2a1nDvH5


Generated by Claude Code


Note

Overview
Updates the default LD-API-Version header on extension REST calls from 20220603 to 20240415 in createOptions (src/api.ts). Every non-beta LaunchDarkly API request from the VS Code extension uses this header, and a per-request version overrides account/token defaults—so v4.0.0+ users were previously counted as old-version API usage even when their tokens defaulted to newer versions.

The beta branch of the header is unchanged (beta when beta: true). Bundled ld-find-code-refs still uses its own version string and is out of scope for this change.

Reviewed by Cursor Bugbot for commit 641efdc. Bugbot is set up for automated code reviews on this repo. Configure here.

The REST client hardcoded LD-API-Version: 20220603 on the non-beta path,
which overrides the account/token default version and forces users onto
the old API version in usage reports. Bump to 20240415 to match current
API tooling. The beta code path is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PAYYUEHtAerrpz2a1nDvH5
@Andrewjeska
Andrewjeska marked this pull request as ready for review September 3, 2026 15:29
@Andrewjeska
Andrewjeska requested a review from a team as a code owner September 3, 2026 15:29
@Andrewjeska
Andrewjeska merged commit b699cd4 into main Sep 3, 2026
6 checks passed
@Andrewjeska
Andrewjeska deleted the fix/api-version-header branch September 3, 2026 16:32
cspath1 pushed a commit that referenced this pull request Sep 8, 2026
Bumps version 6.2.0 -> 6.2.1 and adds a CHANGELOG entry for the
LD-API-Version header fix (#170) so a release can be cut.


Claude-Session: https://claude.ai/code/session_01PAYYUEHtAerrpz2a1nDvH5

Co-authored-by: Claude <noreply@anthropic.com>
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.

VS Code extension hardcodes old LD-API-Version (20220603), inflating old-version API usage

3 participants