发布

  • [Opik-2168] Add cost tracking support for ChatBedrock and ChatBedrockConverse in langchain, expose bedrock as an officially supported provider (#2862)

    frostbyte_neo 发布于 2025-08-01 09:56:31 +00:00

    • Draft

    • Start using new usage extractors in OpikTracer

    • Fix lint errors

    • Fix lint errors

    • Refactor usage extractors, add new mappers to LangChainUsage

    • Simplified if statements in usage extractors

    • Fix lint errors

    • Add default values to langchain usage structure

    • Change default values from int 0 to None

    • Add map_to_groq_completions_usage

    • Update langchain openai test to better reflect the expected usage structure

    • Add docstrings to LLMUsageInfo model

    • Expose bedrock provider in the LLMProvider enum as officially supported one

    • Draft implementation

    • Add streaming mode test

    • Add fixture to ensure bedrock is configured, add more tests for async use case.

    • Remove unnecessary comments

    • Move boto3 import to ensure_aws_bedrock_configured fixture

    • Rename tests

    • Update env var name for aws region in langchain tests workflow file

    • Propagate AWS creds from secrets to env vars

    • assume correct role for bedrock

    • skip tag session

    • Update extractor logic, add support for ChatBedrockConverse

    • Fix lint errors

    • Update parameter settings for chat models in tests


    Co-authored-by: Alex Bezpalko alexb@comet.com

    下载附件