litellm/litellm
ryanh-ai 374c3458d5
feat: add sagemaker_nova provider for Amazon Nova models on SageMaker (#21542)
* feat: add sagemaker_nova provider for Nova models on SageMaker

Add support for custom/fine-tuned Amazon Nova models (Nova Micro, Nova Lite,
Nova 2 Lite) deployed on SageMaker Inference real-time endpoints.

Nova uses OpenAI-compatible request/response format with additional
Nova-specific parameters (top_k, reasoning_effort, allowed_token_ids,
truncate_prompt_tokens) and requires stream:true in the request body.
Nova endpoints also reject 'model' in the request body.

Changes:
- New provider: sagemaker_nova/<endpoint-name>
- SagemakerNovaConfig inherits from SagemakerChatConfig
- Override transform_request to strip 'model' from request body
- Override supports_stream_param_in_request_body (True for Nova)
- Extend get_supported_openai_params with Nova-specific params
- Refactored SagemakerChatConfig to use custom_llm_provider param
  instead of hardcoded strings (backwards-compatible)
- Consolidated main.py routing for sagemaker_chat and sagemaker_nova
- 22 unit tests + 9 integration tests (skip-gated)
- Documentation with SDK, streaming, multimodal, and proxy examples
- All tests verified against live SageMaker Nova endpoint

* fix: move integration tests to tests/local_testing/ per test directory policy

* fix: remove unused module-level SagemakerNovaConfig instance

The sagemaker_nova_config singleton was never imported or used — the
ProviderConfigManager creates its own instance via the lambda registered
in utils.py. Removing this leftover boilerplate.

---------

Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>
2026-03-14 15:10:01 -07:00
..
a2a_protocol style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
anthropic_interface style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
assistants
batch_completion
batches style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
caching Reapply "feat: add model_cost aliases expansion support" 2026-03-12 13:36:57 -03:00
completion_extras [Feat] - Ishaan main merge branch (#23596) 2026-03-14 09:40:00 -07:00
containers style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
endpoints/speech/speech_to_completion_bridge
evals style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
experimental_mcp_client style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
files style: run black formatter on 52 non-enterprise files 2026-03-12 14:23:50 -03:00
fine_tuning style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
google_genai Revert "QA: improve gpt-5.4 code/bugs" 2026-03-13 10:15:47 -07:00
images style: run black formatter on 52 non-enterprise files 2026-03-12 14:23:50 -03:00
integrations Merge branch 'main' into litellm_oss_staging_03_11_2026 2026-03-12 13:53:14 -03:00
interactions style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
litellm_core_utils fix: Fixes https://github.com/BerriAI/litellm/issues/23185 (#23647) 2026-03-14 12:30:52 -07:00
llms feat: add sagemaker_nova provider for Amazon Nova models on SageMaker (#21542) 2026-03-14 15:10:01 -07:00
ocr style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
passthrough style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
proxy Merge pull request #23658 from BerriAI/litellm_internal_dev_03_13_2026 2026-03-14 14:22:27 -07:00
proxy_auth
rag style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
realtime_api [Fix] Correct mypy fixes for realtime_api and presidio 2026-03-13 12:10:27 -07:00
rerank_api style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
responses Litellm dev 03 14 2026 p1 (#23653) 2026-03-14 13:21:10 -07:00
router_strategy [Feat] - Ishaan main merge branch (#23596) 2026-03-14 09:40:00 -07:00
router_utils style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
search style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
secret_managers style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
skills style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
types feat: add sagemaker_nova provider for Amazon Nova models on SageMaker (#21542) 2026-03-14 15:10:01 -07:00
vector_store_files style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
vector_stores Merge branch 'main' into litellm_oss_staging_03_11_2026 2026-03-12 10:43:08 -03:00
videos style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
__init__.py feat: add sagemaker_nova provider for Amazon Nova models on SageMaker (#21542) 2026-03-14 15:10:01 -07:00
_lazy_imports_registry.py feat: add sagemaker_nova provider for Amazon Nova models on SageMaker (#21542) 2026-03-14 15:10:01 -07:00
_lazy_imports.py style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
_logging.py
_redis.py style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
_service_logger.py style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
_uuid.py
_version.py
anthropic_beta_headers_config.json
anthropic_beta_headers_manager.py style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
blog_posts.json
budget_manager.py
constants.py feat: add sagemaker_nova provider for Amazon Nova models on SageMaker (#21542) 2026-03-14 15:10:01 -07:00
cost_calculator.py style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
cost.json
exceptions.py style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
main.py feat: add sagemaker_nova provider for Amazon Nova models on SageMaker (#21542) 2026-03-14 15:10:01 -07:00
model_prices_and_context_window_backup.json fix: auto-fill reasoning_content for moonshot kimi reasoning models in multi-turn tool calling (#23580) 2026-03-13 22:48:45 -07:00
mypy.ini
policy_templates_backup.json
provider_endpoints_support_backup.json
py.typed
router.py [Feat] - Ishaan main merge branch (#23596) 2026-03-14 09:40:00 -07:00
scheduler.py style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
timeout.py
utils.py feat: add sagemaker_nova provider for Amazon Nova models on SageMaker (#21542) 2026-03-14 15:10:01 -07:00