Ishaan Jaff
dc042d1a00
add cost tracking for pass through imagen
2024-09-02 18:10:46 -07:00
Krish Dholakia
5f993f46a0
anthropic prompt caching cost tracking ( #5453 )
...
* fix(utils.py): support 'drop_params' for embedding requests
Fixes https://github.com/BerriAI/litellm/issues/5444
* feat(anthropic/cost_calculation.py): Support calculating cost for prompt caching on anthropic
* feat(types/utils.py): allows us to migrate to openai's equivalent, once that comes out
* fix: fix linting errors
* test: mark flaky test
2024-08-31 14:09:35 -07:00
Krrish Dholakia
cf1a1605a6
feat(cost_calculator.py): only override base model if custom pricing is set
2024-08-19 16:05:49 -07:00
Krish Dholakia
c7627a7de6
Merge pull request #5219 from dhlidongming/fix-messages-length-check
...
Fix incorrect message length check in cost calculator
2024-08-17 14:01:59 -07:00
Krrish Dholakia
29bedae79f
feat(google_ai_studio_endpoints.py): support pass-through endpoint for all google ai studio requests
...
New Feature
2024-08-17 10:46:59 -07:00
Krrish Dholakia
9609505d0c
fix(litellm_logging.py): fix price information logging to s3
2024-08-16 16:42:38 -07:00
Krrish Dholakia
ef51f8600d
feat(litellm_logging.py): support logging model price information to s3 logs
2024-08-16 16:21:34 -07:00
lidongming
47c3b6eca9
Fix incorrect message length check in cost calculator
2024-08-15 16:59:38 +08:00
Krrish Dholakia
a9168df113
fix(cost_calculator.py): fix cost calc
2024-08-12 16:47:15 -07:00
Krrish Dholakia
40b86e7d07
fix(cost_calculator.py): handle openai usage pydantic object
...
Fixes https://github.com/BerriAI/litellm/issues/5165
2024-08-12 15:45:21 -07:00
Krrish Dholakia
6f7d051261
fix(cost_calculator.py): respect litellm.suppress_debug_info for cost calc
...
Fixes https://github.com/BerriAI/litellm/issues/4818#issuecomment-2263795765
2024-08-01 12:27:09 -07:00
Krrish Dholakia
0bcfdafc58
fix(utils.py): fix model registeration to model cost map
...
Fixes https://github.com/BerriAI/litellm/issues/4972
2024-07-30 18:15:00 -07:00
Krrish Dholakia
a6b053f535
feat(databricks.py): support vertex mistral cost tracking
2024-07-27 20:22:35 -07:00
Krrish Dholakia
4687b12732
fix(litellm_logging.py): log response_cost=0 for failed calls
...
Fixes https://github.com/BerriAI/litellm/issues/4604
2024-07-15 19:25:56 -07:00
Krrish Dholakia
3f965df68b
fix(llm_cost_calc/google.py): fix google embedding cost calculation
...
Fixes https://github.com/BerriAI/litellm/issues/4630
2024-07-11 11:55:48 -07:00
Krish Dholakia
ece24015cc
Merge branch 'main' into litellm_tts_pricing
2024-07-06 14:57:34 -07:00
Krrish Dholakia
1390447966
fix(cost_calculator.py): fix completion_response check
2024-07-06 12:28:46 -07:00
Krrish Dholakia
356c18c929
feat(litellm_logging.py): support cost tracking for tts calls
2024-07-05 22:09:08 -07:00
Krrish Dholakia
6220b70261
fix(cost_calculator.py): support openai+azure tts calls
2024-07-05 20:58:08 -07:00
Krrish Dholakia
97ad7eb535
fix(cost_calculator.py): handle unexpected error in cost_calculator.py
2024-06-28 14:53:00 -07:00
Krish Dholakia
fa1cb7d903
Merge branch 'main' into litellm_response_cost_headers
2024-06-27 21:33:09 -07:00
Krrish Dholakia
e81fa6ecad
fix(cost_calculator.py): infer provider name if not given
...
Fixes https://github.com/BerriAI/litellm/issues/4452
2024-06-27 18:41:04 -07:00
Krrish Dholakia
be5d918211
fix(utils.py): return 'response_cost' in completion call
...
Closes https://github.com/BerriAI/litellm/issues/4335
2024-06-26 17:55:57 -07:00
spdustin@gmail.com
16c5ebfe25
fix: use per-token costs for claude via vertex_ai
2024-06-21 11:21:36 -05:00
Krish Dholakia
63277d4b7a
Merge pull request #4295 from BerriAI/litellm_gemini_pricing_2
...
Vertex AI - character based cost calculation
2024-06-19 19:17:09 -07:00
Krrish Dholakia
edfe550165
feat(llm_cost_calc/google.py): do character based cost calculation for vertex ai
...
Calculate cost for vertex ai responses using characters in query/response
Closes https://github.com/BerriAI/litellm/issues/4165
2024-06-19 17:18:42 -07:00
Ishaan Jaff
e9e0e85e39
fix add cost tracking for ft:gpt-4o-2024-05-1
2024-06-19 16:59:06 -07:00
Krrish Dholakia
21878d9ee7
fix(cost_calculator.py): fix time import
2024-06-17 20:27:18 -07:00
Krrish Dholakia
4fd054f188
feat(cost_calculator.py): add cost calculating for dynamic context window (vertex ai / google ai studio)
2024-06-17 12:38:10 -07:00
Krrish Dholakia
9d7f5d503c
refactor(utils.py): refactor Logging to it's own class. Cut down utils.py to <10k lines.
...
Easier debugging
Reference: https://github.com/BerriAI/litellm/issues/4206
2024-06-15 10:57:20 -07:00
Ishaan Jaff
90e297d745
fix azure cost tracking
2024-06-10 21:09:55 -07:00
Krrish Dholakia
2af3c43360
build(model_prices_and_context_window.json): update together ai model pricing - account for new categories
2024-06-08 19:56:35 -07:00
Krrish Dholakia
0a886eed6a
fix(cost_calculator.py): fixes tgai unmapped model pricing
...
Fixes error where tgai helper function returned None. Enforces stronger type hints, refactors code, adds more unit testing.
2024-06-08 19:43:57 -07:00
Krrish Dholakia
7432c6a4d9
fix(utils.py): fix cost calculation for openai-compatible streaming object
2024-06-04 10:36:25 -07:00