Skip to content

Comments

Add Bedrock Devstral 2#21865

Open
emerzon wants to merge 1 commit intoBerriAI:mainfrom
emerzon:add-bedrock-devstral-2-123b
Open

Add Bedrock Devstral 2#21865
emerzon wants to merge 1 commit intoBerriAI:mainfrom
emerzon:add-bedrock-devstral-2-123b

Conversation

@emerzon
Copy link
Contributor

@emerzon emerzon commented Feb 22, 2026

Adds Bedrock Devstral 2 DB entries

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
  • 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
  • I have requested a Greptile review by commenting @greptileai and received a Confidence Score of at least 4/5 before requesting a maintainer review

CI (LiteLLM team)

CI status guideline:

  • 50-55 passing tests: main is stable with minor issues.
  • 45-49 passing tests: acceptable but needs attention
  • <= 40 passing tests: unstable; be careful with your merges and assess the risk.
  • Branch creation CI run
    Link:

  • CI run for the last commit
    Link:

  • Merge / cherry-pick CI run
    Links:

Type

🆕 New Feature

Changes

Copilot AI review requested due to automatic review settings February 22, 2026 02:25
@vercel
Copy link

vercel bot commented Feb 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
litellm Error Error Feb 22, 2026 2:26am

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 22, 2026

Greptile Summary

This PR adds Bedrock Devstral 2 (123B) model definitions across three files. It registers mistral.devstral-2-123b in the BEDROCK_CONVERSE_MODELS list in litellm/constants.py, and adds pricing/capability entries for 12 AWS regions plus a base entry in both JSON pricing files (which are kept in sync).

  • Pricing entries include standard, flex, and priority tiers with region-specific cost variations (e.g., us-east-1/us-west-2 are cheaper than eu-west-2)
  • Model is configured with 256K context window for both input and output, using bedrock_converse provider
  • Supports function calling, tool choice, response schema, and assistant prefill
  • No tests were added with this PR — per the pre-submission checklist, at least 1 test in tests/litellm/ is a hard requirement

Confidence Score: 4/5

  • This PR is safe to merge — it only adds new model metadata entries with no behavioral code changes.
  • The changes are purely additive model pricing/config entries following established patterns. Both JSON files are in sync, the model is correctly registered in BEDROCK_CONVERSE_MODELS, and the litellm_provider is correctly set to bedrock_converse. Minor style note: the entries omit supports_system_messages which other Mistral models include, but this defaults to None and is not a functional issue.
  • No files require special attention — all changes are straightforward data entries.

Important Files Changed

Filename Overview
litellm/constants.py Adds mistral.devstral-2-123b to the BEDROCK_CONVERSE_MODELS list. Correctly placed among other Mistral models. No issues found.
model_prices_and_context_window.json Adds pricing/config entries for mistral.devstral-2-123b across 12 AWS regions plus a base entry. Entries include flex/priority pricing tiers, consistent structure, and correct bedrock_converse provider. Missing supports_system_messages flag that other Mistral models include.
litellm/model_prices_and_context_window_backup.json Identical changes to model_prices_and_context_window.json (backup copy). Both files are in sync. Same minor observation about missing supports_system_messages.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["User calls litellm.completion(model='bedrock/us-east-1/mistral.devstral-2-123b')"] --> B["get_llm_provider_logic.py\nResolves provider as 'bedrock'"]
    B --> C["bedrock/common_utils.py\nChecks BEDROCK_CONVERSE_MODELS"]
    C --> D{"Is model in\nbedrock_converse_models?"}
    D -->|Yes| E["Route to Bedrock Converse API"]
    D -->|No| F["Route to Bedrock Invoke API"]
    E --> G["model_prices_and_context_window.json\nLookup pricing & capabilities"]
    G --> H["Return response with\ncost tracking"]
Loading

Last reviewed commit: fa102a9

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

3 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment on lines +22887 to +22890
"supports_assistant_prefill": true,
"supports_function_calling": true,
"supports_response_schema": 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.

Missing supports_system_messages flag

Other Mistral bedrock_converse models (e.g., mistral.magistral-small-2509, mistral.ministral-3-14b-instruct) include "supports_system_messages": true. This entry omits it. While it defaults to None and won't cause a runtime error, adding it would maintain consistency and ensure system messages are correctly handled for this model.

Suggested change
"supports_assistant_prefill": true,
"supports_function_calling": true,
"supports_response_schema": true,
"supports_tool_choice": true
"supports_assistant_prefill": true,
"supports_function_calling": true,
"supports_response_schema": true,
"supports_system_messages": true,
"supports_tool_choice": true

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds pricing/context-window metadata for the Bedrock-hosted Mistral Devstral 2 123B model so LiteLLM can compute costs and route requests correctly (via bedrock_converse).

Changes:

  • Added regional Bedrock pricing entries for mistral.devstral-2-123b across multiple AWS regions.
  • Added a base (non-region) model entry mistral.devstral-2-123b for default lookups.
  • Registered mistral.devstral-2-123b in BEDROCK_CONVERSE_MODELS so it’s recognized as a Converse-routed Bedrock model.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
model_prices_and_context_window.json Adds Devstral 2 123B pricing + limits + capability flags (regional + base entry).
litellm/model_prices_and_context_window_backup.json Keeps the backup JSON in sync with the main pricing file.
litellm/constants.py Adds the model ID to BEDROCK_CONVERSE_MODELS for Bedrock Converse routing/recognition.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

1 participant