| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…to versioned ones When using google-vertex-anthropic, model IDs like 'claude-sonnet-4-5' were failing to match pricing data because models.dev stores them with date suffixes like 'claude-sonnet-4-5@20250929'. This caused the pricing lookup to fail silently, defaulting costs to 0. Add fallback logic in getModel() that: - Only applies to google-vertex-anthropic provider - Searches for versioned models matching the unversioned ID pattern - Returns the latest version (reverse-sorted by date) - Maintains backward compatibility with versioned IDs - Falls back to standard error handling if no match found Fixes pricing computation so session costs are now calculated correctly instead of always showing $0.00 for google-vertex-anthropic models.
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Sorry, something went wrong.
|
The following comment was made by an LLM, it may be inaccurate: No duplicate PRs found |
Sorry, something went wrong.
|
Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Why
When using the google-vertex-anthropic provider, model IDs like claude-sonnet-4-5 fail to match pricing data because models.dev stores them with date suffixes like claude-sonnet-4-5@20250929. This causes the pricing lookup to fail silently, defaulting costs to 0, resulting in sessions always showing $0.00 pricing.
fixes #9565
What
Add fallback logic in the getModel() function that:
The fix is transparent to users - no configuration changes needed. Sessions now compute accurate costs from the resolved versioned model IDs.
Testing
Added 3 comprehensive tests:
All 69 provider tests pass.