Skip to content

feat!: Remove bedrock-specific tracker method#191

Merged
jsonbailey merged 1 commit into
mainfrom
jb/bedrock-tracker-removal
May 18, 2026
Merged

feat!: Remove bedrock-specific tracker method#191
jsonbailey merged 1 commit into
mainfrom
jb/bedrock-tracker-removal

Conversation

@jsonbailey
Copy link
Copy Markdown
Contributor

@jsonbailey jsonbailey commented May 18, 2026

Summary

  • Remove LDAIConfigTracker.track_bedrock_converse_metrics and the internal _bedrock_to_token_usage helper.
  • Remove the two related tests in tests/test_tracker.py.

Bedrock metric tracking is moving into a dedicated provider package, launchdarkly-server-sdk-ai-bedrock, to match the pattern used by the OpenAI and LangChain providers. A follow-up PR adds that provider package.

feat!: Remove bedrock-specific tracker method from LDAIConfigTracker

Test plan

  • make test in packages/sdk/server-ai (201 passed)
  • Repo grep confirms no remaining references to track_bedrock_converse_metrics or _bedrock_to_token_usage

🤖 Generated with Claude Code


Note

Medium Risk
Medium risk because this is a breaking API change: callers relying on LDAIConfigTracker.track_bedrock_converse_metrics must migrate to provider-specific metric extraction, and existing Bedrock metric tracking behavior is removed from this package.

Overview
Removes built-in AWS Bedrock metric tracking from LDAIConfigTracker. The Bedrock-only track_bedrock_converse_metrics method and its _bedrock_to_token_usage conversion helper are deleted, leaving token tracking to the generic track_tokens API.

Updates tests accordingly by removing the two Bedrock-specific test cases that asserted success/error, duration, and token events derived from Bedrock response payloads.

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

The track_bedrock_converse_metrics method on LDAIConfigTracker and the
internal _bedrock_to_token_usage helper are removed. AWS Bedrock metric
tracking will move to the upcoming launchdarkly-server-sdk-ai-bedrock
provider package, matching the pattern used by the OpenAI and LangChain
providers.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jsonbailey jsonbailey requested a review from a team as a code owner May 18, 2026 21:48
@jsonbailey jsonbailey merged commit 33e4a65 into main May 18, 2026
47 checks passed
@jsonbailey jsonbailey deleted the jb/bedrock-tracker-removal branch May 18, 2026 21:52
@github-actions github-actions Bot mentioned this pull request May 18, 2026
jsonbailey pushed a commit that referenced this pull request May 19, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>launchdarkly-server-sdk-ai: 1.0.0</summary>

##
[1.0.0](launchdarkly-server-sdk-ai-0.20.1...launchdarkly-server-sdk-ai-1.0.0)
(2026-05-19)


### ⚠ BREAKING CHANGES

* Remove bedrock-specific tracker method, use track_metrics_of method
with custom extractor
([#191](#191))
* Remove async from create_model/agent/agent_graph methods
([#187](#187))

### Features

* Remove async from create_model/agent/agent_graph methods
([#187](#187))
([dddc00a](dddc00a))
* Remove bedrock-specific tracker method, use track_metrics_of method
with custom extractor
([#191](#191))
([33e4a65](33e4a65))
</details>

<details><summary>launchdarkly-server-sdk-ai-langchain: 0.8.0</summary>

##
[0.8.0](launchdarkly-server-sdk-ai-langchain-0.7.1...launchdarkly-server-sdk-ai-langchain-0.8.0)
(2026-05-19)


### ⚠ BREAKING CHANGES

* Remove async from create_model/agent/agent_graph methods
([#187](#187))

### Features

* Remove async from create_model/agent/agent_graph methods
([#187](#187))
([dddc00a](dddc00a))
</details>

<details><summary>launchdarkly-server-sdk-ai-openai: 0.7.0</summary>

##
[0.7.0](launchdarkly-server-sdk-ai-openai-0.6.1...launchdarkly-server-sdk-ai-openai-0.7.0)
(2026-05-19)


### ⚠ BREAKING CHANGES

* Remove async from create_model/agent/agent_graph methods
([#187](#187))

### Features

* Remove async from create_model/agent/agent_graph methods
([#187](#187))
([dddc00a](dddc00a))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low code risk since this PR only updates version metadata, dependency
constraints, and changelogs; the main impact is downstream because it
publishes new major/minor versions marked as breaking in release notes.
> 
> **Overview**
> **Release metadata update only.** Bumps `launchdarkly-server-sdk-ai`
to `1.0.0` and the provider packages to `0.8.0` (LangChain) and `0.7.0`
(OpenAI), updating `.release-please-manifest.json`, `pyproject.toml`
versions/dependency minimums, and `ldai.__version__`.
> 
> Updates changelogs and provenance docs to reflect the new releases,
including release notes that call out breaking API changes (not
implemented in this diff).
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
176e8bd. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.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.

2 participants