Mirascope / mirascope

LLM abstractions that aren't obstructions
http://mirascope.com/
MIT License
757 stars 50 forks source link

Anthropic cost coverage for AWS bedrock and Vertex #501

Closed ramon-prieto closed 1 month ago

ramon-prieto commented 1 month ago

Description

Currently, the calculate cost function only accepts the naming convention from the official Anthropic API. Can we extend the cost mapping to allow for cost estimation on workflows using either the Vertex or Bedrock clients?

https://github.com/Mirascope/mirascope/blob/dev/mirascope/core/anthropic/_utils/_calculate_cost.py#L20

willbakst commented 1 month ago

A bit swamped this week, but will try to look into this next week.

PR welcome if you have the time and want to contribute!

Would be much appreciated :)

ramon-prieto commented 1 month ago

Created this PR to extend the mapping