litellm/litellm
mubashir1osmani df7e3aa1e5 feat(provider): add Amazon Bedrock Mantle as a first-class provider
Adds `bedrock_mantle` provider for Amazon Bedrock's OpenAI-compatible
inference engine (Project Mantle). Previously users had to use this as
a generic openai_compatible provider, which resulted in incorrect pricing
(OpenAI rates instead of Bedrock rates).

Changes:
- New `BedrockMantleChatConfig` extending `OpenAILikeChatConfig`
  - Regional API base: `https://bedrock-mantle.{region}.api.aws/v1`
  - Auth via `BEDROCK_MANTLE_API_KEY` env var
  - Region resolution: BEDROCK_MANTLE_REGION > AWS_REGION > us-east-1
  - Supports reasoning for gpt-oss models
- Added `BEDROCK_MANTLE` to `LlmProviders` enum
- Added 4 models with correct AWS Bedrock pricing to both pricing files:
  - bedrock_mantle/openai.gpt-oss-120b ($0.15/M in, $0.60/M out)
  - bedrock_mantle/openai.gpt-oss-20b ($0.075/M in, $0.30/M out)
  - bedrock_mantle/openai.gpt-oss-safeguard-120b
  - bedrock_mantle/openai.gpt-oss-safeguard-20b
- Wired provider into get_llm_provider_logic, get_supported_openai_params,
  main.py routing, utils.py map_openai_params + ProviderConfigManager,
  and _lazy_imports_registry
- 19 unit tests covering registration, config, provider resolution, pricing

Usage:
  os.environ["BEDROCK_MANTLE_API_KEY"] = "your-key"
  litellm.completion(model="bedrock_mantle/openai.gpt-oss-120b", ...)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 00:03:40 -05:00
..
a2a_protocol fix: prompt registry 2026-02-18 00:34:54 +05:30
anthropic_interface fix: prompt registry 2026-02-18 00:34:54 +05:30
assistants
batch_completion fix: prompt registry 2026-02-18 00:34:54 +05:30
batches Fix: Test connect failing for bedrock batches mode 2026-02-25 15:03:27 +05:30
caching fix(caching): store background task references in LLMClientCache._remove_key to prevent unawaited coroutine warnings 2026-02-27 21:23:56 -05:00
completion_extras merge: resolve conflict with upstream/main in presidio.py 2026-03-02 17:40:22 -03:00
containers fix: prompt registry 2026-02-18 00:34:54 +05:30
endpoints/speech/speech_to_completion_bridge
evals fix: prompt registry 2026-02-18 00:34:54 +05:30
experimental_mcp_client added configurable env for mcp timeouts (#22287) 2026-03-02 13:13:41 -08:00
files fix: prompt registry 2026-02-18 00:34:54 +05:30
fine_tuning
google_genai fix: prompt registry 2026-02-18 00:34:54 +05:30
images Merge branch 'litellm_oss_staging_02_27_2026' of https://github.com/BerriAI/litellm into litellm_oss_staging_02_27_2026 2026-02-28 09:54:56 -03:00
integrations Merge branch 'litellm_oss_staging_02_27_2026' of https://github.com/BerriAI/litellm into litellm_oss_staging_02_27_2026 2026-02-28 09:54:56 -03:00
interactions fix: prompt registry 2026-02-18 00:34:54 +05:30
litellm_core_utils feat(provider): add Amazon Bedrock Mantle as a first-class provider 2026-03-05 00:03:40 -05:00
llms feat(provider): add Amazon Bedrock Mantle as a first-class provider 2026-03-05 00:03:40 -05:00
ocr Enable local file support for OCR (#22133) 2026-02-27 10:50:02 -08:00
passthrough fix(types): fix mypy errors in pass-through endpoint query param types 2026-02-19 12:24:14 -03:00
proxy Add CrowdStrike AIDR guardrail hook (#17876) 2026-03-02 17:26:54 -08:00
proxy_auth fix: prompt registry 2026-02-18 00:34:54 +05:30
rag fix: prompt registry 2026-02-18 00:34:54 +05:30
realtime_api fix(azure): forward realtime_protocol from config and relax api_version check for GA path (#22369) 2026-03-02 19:21:27 +05:30
rerank_api fix(bedrock): pass timeout param to bedrock rerank http client (#22021) 2026-02-24 09:32:11 -08:00
responses [Release Fix] (#22411) 2026-02-28 09:46:35 -08:00
router_strategy fix(lint): fix ruff/flake8 violations - unused imports, PLR0915, print statements (#21846) 2026-02-21 15:07:47 -08:00
router_utils fix: use atomic increment-first pattern for model RPM rate limiting 2026-02-24 09:55:07 -03:00
search
secret_managers fix: prompt registry 2026-02-18 00:34:54 +05:30
skills fix: prompt registry 2026-02-18 00:34:54 +05:30
types feat(provider): add Amazon Bedrock Mantle as a first-class provider 2026-03-05 00:03:40 -05:00
vector_store_files
vector_stores
videos fix(ollama): thread api_base to get_model_info + graceful fallback (#21970) 2026-02-23 21:00:37 -08:00
__init__.py feat(provider): add Amazon Bedrock Mantle as a first-class provider 2026-03-05 00:03:40 -05:00
_lazy_imports.py fix: prompt registry 2026-02-18 00:34:54 +05:30
_lazy_imports_registry.py feat(provider): add Amazon Bedrock Mantle as a first-class provider 2026-03-05 00:03:40 -05:00
_logging.py fix: prompt registry 2026-02-18 00:34:54 +05:30
_redis.py fix: close leaked Redis connection pools on cache eviction and disconnect 2026-02-20 17:09:32 -08:00
_service_logger.py fix: prompt registry 2026-02-18 00:34:54 +05:30
_uuid.py
_version.py
anthropic_beta_headers_config.json fix: enable context-1m-2025-08-07 beta header for vertex_ai provider (#21867) 2026-02-21 20:12:23 -08:00
anthropic_beta_headers_manager.py fix: prompt registry 2026-02-18 00:34:54 +05:30
blog_posts.json fix(ollama): thread api_base to get_model_info + graceful fallback (#21970) 2026-02-23 21:00:37 -08:00
budget_manager.py
constants.py added configurable env for mcp timeouts (#22287) 2026-03-02 13:13:41 -08:00
cost.json
cost_calculator.py fix(transcription): store duration in _hidden_params to avoid OpenAI SDK deserialization issues 2026-02-26 16:06:08 -03:00
exceptions.py Remove nit 2026-02-26 13:44:06 -08:00
main.py feat(provider): add Amazon Bedrock Mantle as a first-class provider 2026-03-05 00:03:40 -05:00
model_prices_and_context_window_backup.json feat(provider): add Amazon Bedrock Mantle as a first-class provider 2026-03-05 00:03:40 -05:00
mypy.ini
policy_templates_backup.json feat(add-new-block_code_execution-guardrail): prevent agent from executing code (#22154) 2026-02-25 22:02:14 -08:00
provider_endpoints_support_backup.json fix: add 12 missing endpoint keys to _ENDPOINT_METADATA, fix stale _schema keys in backup JSON 2026-02-26 19:18:17 -08:00
py.typed
router.py Merge pull request #22526 from BerriAI/fix/router-plr0915-noqa 2026-03-01 18:02:33 -03:00
scheduler.py fix: prompt registry 2026-02-18 00:34:54 +05:30
timeout.py
utils.py feat(provider): add Amazon Bedrock Mantle as a first-class provider 2026-03-05 00:03:40 -05:00