Skip to content

Fix: Standardize Model Names for Consistency in Cost Calculation and API Calls#29

Open
amey1234444 wants to merge 5 commits intoSamuelSchmidgall:mainfrom
amey1234444:main
Open

Fix: Standardize Model Names for Consistency in Cost Calculation and API Calls#29
amey1234444 wants to merge 5 commits intoSamuelSchmidgall:mainfrom
amey1234444:main

Conversation

@amey1234444
Copy link

@amey1234444 amey1234444 commented Jan 13, 2025

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).

@whats2000
Copy link

Check the #73

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.

Inference.py - Mismatch in Model String

2 participants