mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-17 09:34:48 +00:00
fix(cost-map): declare mid-conversation system support on Databricks Claude Opus 5.5 (#52214)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
c25c669167
commit
e46fa61681
3 changed files with 23 additions and 0 deletions
|
|
@ -22092,6 +22092,7 @@
|
|||
"supports_forced_tool_use": false,
|
||||
"supports_function_calling": true,
|
||||
"supports_max_reasoning_effort": true,
|
||||
"supports_mid_conversation_system": true,
|
||||
"supports_minimal_reasoning_effort": false,
|
||||
"supports_none_reasoning_effort": false,
|
||||
"supports_output_config": true,
|
||||
|
|
|
|||
|
|
@ -22092,6 +22092,7 @@
|
|||
"supports_forced_tool_use": false,
|
||||
"supports_function_calling": true,
|
||||
"supports_max_reasoning_effort": true,
|
||||
"supports_mid_conversation_system": true,
|
||||
"supports_minimal_reasoning_effort": false,
|
||||
"supports_none_reasoning_effort": false,
|
||||
"supports_output_config": true,
|
||||
|
|
|
|||
|
|
@ -598,6 +598,27 @@ def test_shipped_rules_are_provider_neutral_for_unmapped_ids(shipped_cost_map, m
|
|||
assert not info.get("output_cost_per_token")
|
||||
|
||||
|
||||
def _shipped_databricks_claude_rows_matching_the_mid_conversation_rule() -> tuple[str, ...]:
|
||||
document: Final = json.loads((REPO_ROOT / "model_prices_and_context_window.json").read_text())
|
||||
rule: Final = next(
|
||||
rule
|
||||
for rule in document["fallback_generalizations"]["rules"]
|
||||
if rule["name"] == "claude-mid-conversation-system"
|
||||
)
|
||||
pattern: Final = re.compile(rule["pattern"], re.IGNORECASE)
|
||||
return tuple(
|
||||
key
|
||||
for key, row in document.items()
|
||||
if isinstance(row, dict) and row.get("litellm_provider") == "databricks" and pattern.search(key)
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("model", _shipped_databricks_claude_rows_matching_the_mid_conversation_rule())
|
||||
def test_shipped_databricks_claude_rows_agree_with_the_mid_conversation_rule(shipped_cost_map, model):
|
||||
"""The rule does not fill Databricks rows, so a row that omits the flag turns reminders into user turns."""
|
||||
assert litellm.utils.supports_mid_conversation_system(model=model, custom_llm_provider="databricks") is True, model
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"model,provider,adaptive,mid_conversation",
|
||||
[
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue