litellm/litellm/types
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
..
containers style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
google_genai fix(mypy): fix scattered 1-off type errors across 14 files 2026-03-13 00:08:57 +00:00
images merge: resolve conflicts between main and litellm_oss_staging_03_11_2026 2026-03-12 09:38:31 -03:00
integrations style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
interactions style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
litellm_core_utils include server_tool_use in streaming usage (#16826) 2025-11-25 14:50:17 -08:00
llms fix(mypy): sync route_type Literals, fix BFL params and signatures 2026-03-12 23:51:35 +00:00
management_endpoints style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
mcp_server style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
passthrough_endpoints Revert "Add streamGenerateContent cost tracking in passthrough (#15199)" (#15202) 2025-10-04 14:37:02 -07:00
prompts Prompt Management - new API for integrating providers (#17829) 2025-12-11 15:43:40 -08:00
proxy [Feature] UI - Default Team Settings: Modernize page and fix defaults application 2026-03-14 00:01:25 -07:00
responses 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
videos style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
access_group.py allow editing of access group names 2026-02-13 17:03:41 -08:00
adapter.py feat(anthropic_adapter.py): support for translating anthropic params to openai format 2024-07-10 00:32:28 -07:00
agents.py fix(agents.tsx): support granting agents access to subagents 2026-03-10 21:03:20 -07:00
caching.py style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
completion.py fix: correct CompletionRequest messages type to match OpenAI API spec (#12980) 2025-07-28 16:47:20 -07:00
embedding.py Removed config dict type definition 2024-05-17 10:39:00 +08:00
files.py style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
fine_tuning.py (feat) POST /fine_tuning/jobs support passing vertex specific hyper params (#7490) 2025-01-01 07:44:48 -08:00
guardrails.py feat: allow multiple calls from tags 2026-03-07 11:24:18 +05:30
mcp.py merge: resolve conflicts between main and litellm_oss_staging_03_11_2026 2026-03-12 09:38:31 -03:00
policy_engine.py [Feat] New LiteLLM Policy engine - create policies to manage guardrails, conditions - permissions per Key, Team (#19612) 2026-01-22 19:49:53 -08:00
rag.py style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
realtime.py address greptile review feedback (greploop iteration 2) 2026-03-12 18:53:22 +05:30
rerank.py build(pyproject.toml): add new dev dependencies - for type checking (#9631) 2025-03-29 11:02:13 -07:00
router.py [Feat] - Ishaan main merge branch (#23596) 2026-03-14 09:40:00 -07:00
scheduler.py Squashed commit of the following: (#9709) 2025-04-02 21:24:54 -07:00
search.py style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
services.py [Fix] CI/CD - mypy & check_code_and_doc_quality & mcp_testing (#17920) 2025-12-13 08:18:43 -08:00
tag_management.py style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
tool_management.py Bug Fix: auto-inject prompt caching support for Gemini models (#21881) 2026-03-03 20:25:35 -08:00
utils.py feat: add sagemaker_nova provider for Amazon Nova models on SageMaker (#21542) 2026-03-14 15:10:01 -07:00
vector_store_files.py Vector store files Stable Release (#16643) 2025-11-15 13:00:33 -08:00
vector_stores.py style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00