Skip to content

Add Claude 4 Sonnet & Opus, DeepSeek R1, and fix Llama Vision model pricing configurations #11339

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

Conversation

colesmcintosh
Copy link
Collaborator

Title

Add Claude 4 Sonnet & Opus, DeepSeek R1, and fix Llama Vision model pricing configurations

Relevant issues

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • I have added a screenshot of my new test passing locally
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🆕 New Feature
🐛 Bug Fix

Changes

This PR adds pricing and configuration support for new AI models and fixes an existing model path:

New Models Added:

  1. Claude 4 Sonnet (claude-4-sonnet-20250514)

    • Max tokens: 64K input, 64K output
    • Input cost: $3.00/M tokens, Output cost: $15.00/M tokens
    • Full feature support including function calling, vision, reasoning, computer use
    • Prompt caching support
  2. Claude 4 Opus (claude-4-opus-20250514)

    • Max tokens: 200K input, 32K output
    • Input cost: $15.00/M tokens, Output cost: $75.00/M tokens
    • Full feature support including function calling, vision, reasoning, computer use
    • Prompt caching support
  3. DeepSeek R1 (fireworks_ai/accounts/fireworks/models/deepseek-r1-0528)

    • Max tokens: 160K input/output
    • Input cost: $3.00/M tokens, Output cost: $8.00/M tokens
    • Response schema support, no tool choice support
    • Source

Bug Fixes:

  • Fixed model path for llama-v3p2-90b-vision-instruct by adding missing fireworks_ai/ prefix

Files Modified:

  • model_prices_and_context_window.json - Added new model configurations and fixed existing model path

All changes are contained within the pricing configuration file and maintain consistency with existing model definitions.

Copy link

vercel bot commented Jun 3, 2025

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 4, 2025 3:01am

@krrishdholakia
Copy link
Contributor

Looks like this failed on - async def test_supports_tool_choice(): @colesmcintosh

"max_tokens": 16384,
"max_input_tokens": 16384,
"max_output_tokens": 16384,
"input_cost_per_token": 9e-07,
"output_cost_per_token": 9e-07,
"litellm_provider": "fireworks_ai",
"mode": "chat",
"supports_function_calling": true,
"supports_tool_choice": true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it also support function calling? if so we should keep that flag

if not - then how can it support tool choice?

"litellm_provider": "fireworks_ai",
"mode": "chat",
"source": "https://fireworks.ai/pricing",
"supports_tool_choice": true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how can it support tool choice without supporting function calling?

colesmcintosh and others added 2 commits June 3, 2025 10:22
…e for multiple models in fireworks_ai. Adjusted supported parameters in FireworksAIConfig to conditionally include tools and tool_choice based on model compatibility.
# Currently only firefunction-v2, mixtral-8x22b-instruct-hf, and llama-v3p1-405b-instruct support tool calling
if (
"firefunction-v2" in model
or "mixtral-8x22b-instruct-hf" in model
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we rely on the map for this - moving to use supports_function_calling util from the litellm.utils

this way, we can just update the model cost map for any future model additions

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to use supports_function_calling from utils

@krrishdholakia krrishdholakia merged commit 7bbd826 into BerriAI:main Jun 4, 2025
6 checks passed
stefan-- pushed a commit to stefan--/litellm that referenced this pull request Jun 12, 2025
…ricing configurations (BerriAI#11339)

* fix: update model path for llama-v3p2-90b-vision-instruct in pricing configuration (missing fireworks_ai/ prefix)

* feat: add deepseek-r1-0528 model configuration to pricing JSON

* feat: add configurations for new Claude 4 model alias to pricing JSON

* undo prefix change

* fix: update supports_response_schema to false in pricing JSON for litellm_provider

* update supports_tool_choice and supports_response_schema

* Update model configuration to disable function calling and tool choice for multiple models in fireworks_ai. Adjusted supported parameters in FireworksAIConfig to conditionally include tools and tool_choice based on model compatibility.

* Refactor FireworksAIConfig to use supports_function_calling from utils

* Enhance FireworksAIConfig to conditionally support tool_choice based on model capabilities
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.

2 participants