Summary

  • Adds Bedrock cost-tracking support
  • Preserves existing _bedrock provider string for compatibility

Resolves #1836 /claim #1836

Key Changes

Python SDK

  • Extended LLMProvider enum with BEDROCK = "_bedrock"
  • llm_usage_factory maps both:
    • LLMProvider.BEDROCK
    • Raw string "_bedrock"
      → to the Bedrock usage parser
  • Bedrock decorator now uses LLMProvider.BEDROCK
  • Unit test added: test_opik_usage_factory__bedrock_happyflow

Backend (Java)

  • CostService maps:
    • "_bedrock", "bedrock_converse""bedrock" for pricing
  • E2E test updates:
    • Includes Bedrock (normal + streaming) in SpansResourceTest#createAndGetCost

Docs

  • No changes needed — existing Bedrock guides already use _bedrock

Testing

  • Python: New unit test verifies Bedrock usage parsing
  • Backend: Existing E2E cost test cover Bedrock models (including streaming), added cost computation

Claim

Total prize pool $50
Total paid $0
Status Pending
Submitted July 29, 2025
Last updated July 29, 2025

Contributors

VL

Vladimir Rotariu

@vladimirrotariu

100%

Sponsors

CO

Comet

@comet-ml

$50