Fix: Standardize Model Names for Consistency in Cost Calculation and API Calls#29
Open
amey1234444 wants to merge 5 commits intoSamuelSchmidgall:mainfrom
Open
Fix: Standardize Model Names for Consistency in Cost Calculation and API Calls#29amey1234444 wants to merge 5 commits intoSamuelSchmidgall:mainfrom
amey1234444 wants to merge 5 commits intoSamuelSchmidgall:mainfrom
Conversation
|
Check the #73 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #20
This pull request resolves the issue of inconsistent model naming across the codebase, which led to mismatches in cost calculation and API calls. Specifically, the following updates were made:
Unified Model Names: All instances of the model names were standardized to use a single format: "claude-3-5-sonnet".
Updated Cost Mappings: The cost dictionaries now reflect the correct standardized model name "claude-3-5-sonnet".
Refactored API Calls: The model reference in client.messages.create() was updated to "claude-3-5-sonnet" to match the standardized naming convention.
There were discrepancies in how the model name was referenced across different parts of the code, leading to potential issues with accurate cost calculation and model selection. By standardizing the model names, we ensure that token usage and cost are correctly attributed to the intended model, preventing misattribution or incorrect tallies.
How Has This Been Tested?
I verified that the model name consistency is maintained across cost dictionaries, model checks, and API calls.
I tested the query_model() function with the "claude-3-5-sonnet" model to ensure the proper model is selected and costs are calculated correctly.
Bug Fix
I have read the contributing guidelines.
My code follows the project's coding style.
I have tested my changes.
I have updated the documentation accordingly (if necessary).