Skip to content

Commit 1ef7286

Browse files
committed
Fix merge conflicts
1 parent 3fe23fa commit 1ef7286

File tree

4 files changed

+24
-127
lines changed

4 files changed

+24
-127
lines changed

litellm/llms/sap/chat/models.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ class SAPToolChatMessage(BaseModel):
124124
)
125125

126126

127+
ChatMessage = Union[SAPMessage, SAPUserMessage, SAPAssistantMessage, SAPToolChatMessage]
128+
129+
127130
class ResponseFormat(BaseModel):
128131
type_: Literal["text", "json_object"] = Field(default="text", alias="type")
129132

litellm/llms/sap/chat/transformation.py

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
TYPE_CHECKING,
1212
Iterator,
1313
AsyncIterator,
14+
FrozenSet,
1415
)
1516
from functools import cached_property
1617
import litellm
@@ -31,17 +32,33 @@
3132

3233
from ..credentials import get_token_creator
3334
from .models import (
34-
ResponseFormatJSONSchema,
35-
ResponseFormat,
36-
OrchestrationRequest,
3735
ChatCompletionTool,
36+
OrchestrationRequest,
37+
ResponseFormat,
38+
ResponseFormatJSONSchema,
39+
SAPAssistantMessage,
40+
SAPMessage,
41+
SAPToolChatMessage,
42+
SAPUserMessage,
3843
)
3944
from .handler import (
4045
GenAIHubOrchestrationError,
4146
AsyncSAPStreamIterator,
4247
SAPStreamIterator,
4348
)
4449

50+
# Keys routed outside SAP orchestration `model.params` (prompt, stream, fallbacks, etc.)
51+
_SAP_MODEL_PARAMS_EXCLUDED_KEYS: FrozenSet[str] = frozenset(
52+
{
53+
"tools",
54+
"tool_choice",
55+
"stream_options",
56+
"fallback_sap_modules",
57+
"placeholder_values",
58+
"model_version",
59+
}
60+
)
61+
4562

4663
def validate_dict(data: dict, model) -> dict:
4764
return model(**data).model_dump(by_alias=True, exclude_unset=True)
@@ -277,6 +294,7 @@ def transform_request(
277294

278295
template = messages
279296

297+
excluded_params = _SAP_MODEL_PARAMS_EXCLUDED_KEYS
280298
model_params = {
281299
k: v for k, v in optional_params.items() if k not in excluded_params
282300
}

litellm/model_prices_and_context_window_backup.json

Lines changed: 0 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -7818,28 +7818,6 @@
78187818
"cache_read_input_token_cost": 3e-08,
78197819
"cache_creation_input_token_cost": 3.75e-07
78207820
},
7821-
"bedrock/us-gov-east-1/claude-sonnet-4-5-20250929-v1:0": {
7822-
"input_cost_per_token": 3.6e-06,
7823-
"litellm_provider": "bedrock",
7824-
"max_input_tokens": 200000,
7825-
"max_output_tokens": 8192,
7826-
"max_tokens": 8192,
7827-
"max_output_tokens": 8192,
7828-
"max_tokens": 8192,
7829-
"mode": "chat",
7830-
"output_cost_per_token": 1.8e-05,
7831-
"supports_assistant_prefill": true,
7832-
"supports_computer_use": true,
7833-
"supports_function_calling": true,
7834-
"supports_pdf_input": true,
7835-
"supports_prompt_caching": true,
7836-
"supports_reasoning": true,
7837-
"supports_response_schema": true,
7838-
"supports_tool_choice": true,
7839-
"supports_vision": true,
7840-
"cache_read_input_token_cost": 3.6e-07,
7841-
"cache_creation_input_token_cost": 4.5e-06
7842-
},
78437821
"bedrock/us-gov-east-1/anthropic.claude-sonnet-4-5-20250929-v1:0": {
78447822
"cache_creation_input_token_cost": 4.125e-06,
78457823
"cache_read_input_token_cost": 3.3e-07,
@@ -7861,26 +7839,6 @@
78617839
"supports_vision": true,
78627840
"supports_native_structured_output": true
78637841
},
7864-
"bedrock/us-gov-east-1/anthropic.claude-sonnet-4-5-20250929-v1:0": {
7865-
"cache_creation_input_token_cost": 4.125e-06,
7866-
"cache_read_input_token_cost": 3.3e-07,
7867-
"input_cost_per_token": 3.3e-06,
7868-
"litellm_provider": "bedrock",
7869-
"max_input_tokens": 200000,
7870-
"max_output_tokens": 8192,
7871-
"max_tokens": 8192,
7872-
"mode": "chat",
7873-
"output_cost_per_token": 1.65e-05,
7874-
"supports_assistant_prefill": true,
7875-
"supports_computer_use": true,
7876-
"supports_function_calling": true,
7877-
"supports_pdf_input": true,
7878-
"supports_prompt_caching": true,
7879-
"supports_reasoning": true,
7880-
"supports_response_schema": true,
7881-
"supports_tool_choice": true,
7882-
"supports_vision": true
7883-
},
78847842
"bedrock/us-gov-east-1/meta.llama3-70b-instruct-v1:0": {
78857843
"input_cost_per_token": 2.65e-06,
78867844
"litellm_provider": "bedrock",
@@ -8012,28 +7970,6 @@
80127970
"cache_read_input_token_cost": 3e-08,
80137971
"cache_creation_input_token_cost": 3.75e-07
80147972
},
8015-
"bedrock/us-gov-west-1/claude-sonnet-4-5-20250929-v1:0": {
8016-
"input_cost_per_token": 3.6e-06,
8017-
"litellm_provider": "bedrock",
8018-
"max_input_tokens": 200000,
8019-
"max_output_tokens": 8192,
8020-
"max_tokens": 8192,
8021-
"max_output_tokens": 8192,
8022-
"max_tokens": 8192,
8023-
"mode": "chat",
8024-
"output_cost_per_token": 1.8e-05,
8025-
"supports_assistant_prefill": true,
8026-
"supports_computer_use": true,
8027-
"supports_function_calling": true,
8028-
"supports_pdf_input": true,
8029-
"supports_prompt_caching": true,
8030-
"supports_reasoning": true,
8031-
"supports_response_schema": true,
8032-
"supports_tool_choice": true,
8033-
"supports_vision": true,
8034-
"cache_read_input_token_cost": 3.6e-07,
8035-
"cache_creation_input_token_cost": 4.5e-06
8036-
},
80377973
"bedrock/us-gov-west-1/anthropic.claude-sonnet-4-5-20250929-v1:0": {
80387974
"cache_creation_input_token_cost": 4.125e-06,
80397975
"cache_read_input_token_cost": 3.3e-07,
@@ -8055,26 +7991,6 @@
80557991
"supports_vision": true,
80567992
"supports_native_structured_output": true
80577993
},
8058-
"bedrock/us-gov-west-1/anthropic.claude-sonnet-4-5-20250929-v1:0": {
8059-
"cache_creation_input_token_cost": 4.125e-06,
8060-
"cache_read_input_token_cost": 3.3e-07,
8061-
"input_cost_per_token": 3.3e-06,
8062-
"litellm_provider": "bedrock",
8063-
"max_input_tokens": 200000,
8064-
"max_output_tokens": 8192,
8065-
"max_tokens": 8192,
8066-
"mode": "chat",
8067-
"output_cost_per_token": 1.65e-05,
8068-
"supports_assistant_prefill": true,
8069-
"supports_computer_use": true,
8070-
"supports_function_calling": true,
8071-
"supports_pdf_input": true,
8072-
"supports_prompt_caching": true,
8073-
"supports_reasoning": true,
8074-
"supports_response_schema": true,
8075-
"supports_tool_choice": true,
8076-
"supports_vision": true
8077-
},
80787994
"bedrock/us-gov-west-1/meta.llama3-70b-instruct-v1:0": {
80797995
"input_cost_per_token": 2.65e-06,
80807996
"litellm_provider": "bedrock",

model_prices_and_context_window.json

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -7818,26 +7818,6 @@
78187818
"cache_read_input_token_cost": 3e-08,
78197819
"cache_creation_input_token_cost": 3.75e-07
78207820
},
7821-
"bedrock/us-gov-east-1/claude-sonnet-4-5-20250929-v1:0": {
7822-
"input_cost_per_token": 3.6e-06,
7823-
"litellm_provider": "bedrock",
7824-
"max_input_tokens": 200000,
7825-
"max_output_tokens": 8192,
7826-
"max_tokens": 8192,
7827-
"mode": "chat",
7828-
"output_cost_per_token": 1.8e-05,
7829-
"supports_assistant_prefill": true,
7830-
"supports_computer_use": true,
7831-
"supports_function_calling": true,
7832-
"supports_pdf_input": true,
7833-
"supports_prompt_caching": true,
7834-
"supports_reasoning": true,
7835-
"supports_response_schema": true,
7836-
"supports_tool_choice": true,
7837-
"supports_vision": true,
7838-
"cache_read_input_token_cost": 3.6e-07,
7839-
"cache_creation_input_token_cost": 4.5e-06
7840-
},
78417821
"bedrock/us-gov-east-1/anthropic.claude-sonnet-4-5-20250929-v1:0": {
78427822
"cache_creation_input_token_cost": 4.125e-06,
78437823
"cache_read_input_token_cost": 3.3e-07,
@@ -7990,26 +7970,6 @@
79907970
"cache_read_input_token_cost": 3e-08,
79917971
"cache_creation_input_token_cost": 3.75e-07
79927972
},
7993-
"bedrock/us-gov-west-1/claude-sonnet-4-5-20250929-v1:0": {
7994-
"input_cost_per_token": 3.6e-06,
7995-
"litellm_provider": "bedrock",
7996-
"max_input_tokens": 200000,
7997-
"max_output_tokens": 8192,
7998-
"max_tokens": 8192,
7999-
"mode": "chat",
8000-
"output_cost_per_token": 1.8e-05,
8001-
"supports_assistant_prefill": true,
8002-
"supports_computer_use": true,
8003-
"supports_function_calling": true,
8004-
"supports_pdf_input": true,
8005-
"supports_prompt_caching": true,
8006-
"supports_reasoning": true,
8007-
"supports_response_schema": true,
8008-
"supports_tool_choice": true,
8009-
"supports_vision": true,
8010-
"cache_read_input_token_cost": 3.6e-07,
8011-
"cache_creation_input_token_cost": 4.5e-06
8012-
},
80137973
"bedrock/us-gov-west-1/anthropic.claude-sonnet-4-5-20250929-v1:0": {
80147974
"cache_creation_input_token_cost": 4.125e-06,
80157975
"cache_read_input_token_cost": 3.3e-07,

0 commit comments

Comments
 (0)