Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cost_calculator.py): fixes tgai unmapped model pricing #4085

Merged
merged 1 commit into from
Jun 9, 2024

Conversation

krrishdholakia
Copy link
Contributor

Title

Fixes error where tgai helper function returned None. Enforces stronger type hints, refactors code, adds more unit testing.

Relevant issues

Fixes #4082

Type

🐛 Bug Fix
🧹 Refactoring

Changes

  • adds type hints to get_model_params_and_category
  • moves usage calculation functions to cost_calculator.py for easier debugging
  • adds testing for together_ai unmapped model pricing to test_completion_cost.py

[REQUIRED] Testing - Attach a screenshot of any new tests passing locall

If UI changes, send a screenshot/GIF of working UI fixes

Screenshot 2024-06-08 at 7 46 37 PM

Fixes error where tgai helper function returned None. Enforces stronger type hints, refactors code, adds more unit testing.
Copy link

vercel bot commented Jun 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 9, 2024 2:46am

@krrishdholakia krrishdholakia merged commit e42198f into main Jun 9, 2024
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: TypeError when using a model not in model_prices_and_context_window.json
1 participant