We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 76d5a6e commit cd7ee73Copy full SHA for cd7ee73
pyproject.toml
@@ -10,7 +10,7 @@ tokencost = ["model_prices.json"]
10
11
[project]
12
name = "tokencost"
13
-version = "0.1.14"
+version = "0.1.15"
14
authors = [
15
{ name = "Trisha Pan", email = "trishaepan@gmail.com" },
16
{ name = "Alex Reibman", email = "areibman@gmail.com" },
tokencost/constants.py
@@ -46,7 +46,8 @@ async def update_token_costs():
46
"""Update the TOKEN_COSTS dictionary with the latest costs from the LiteLLM cost tracker asynchronously."""
47
global TOKEN_COSTS
48
try:
49
- TOKEN_COSTS = await fetch_costs()
+ fetched_costs = await fetch_costs()
50
+ TOKEN_COSTS.update(fetched_costs)
51
# Safely remove 'sample_spec' if it exists
52
TOKEN_COSTS.pop('sample_spec', None)
53
except Exception as e:
0 commit comments