mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
fix(cognition): price swe-1.7 from the published standard tier
The swe-1.7 rates were carried over from the closed prior attempt and match SWE-1.7 Lightning, 5x the SWE-1.7 Max and Medium rates the vendor publishes. swe-1.6 was already on the standard tier, so the two entries disagreed with each other. Both now read 0.5 in, 2.5 out, 0.2 cached per million tokens. Also drops the redundant registry comment in constants.py.
This commit is contained in:
parent
e00301703f
commit
332a0f1b9b
4 changed files with 11 additions and 11 deletions
|
|
@ -831,7 +831,7 @@ openai_compatible_providers: Final[list] = [
|
|||
"pinstripes", # Pinstripes - JSON-configured provider
|
||||
"darkbloom",
|
||||
"meta", # Meta Model API (Muse Spark) - JSON-configured provider
|
||||
"cognition", # Cognition - JSON-configured provider
|
||||
"cognition",
|
||||
]
|
||||
openai_text_completion_compatible_providers: Final[list] = [ # providers that support `/v1/completions`
|
||||
"together_ai",
|
||||
|
|
|
|||
|
|
@ -48486,9 +48486,9 @@
|
|||
"source": "https://docs.devin.ai/windsurf/plugins/cascade/models"
|
||||
},
|
||||
"cognition/swe-1.7": {
|
||||
"input_cost_per_token": 2.5e-06,
|
||||
"output_cost_per_token": 1.25e-05,
|
||||
"cache_read_input_token_cost": 1e-06,
|
||||
"input_cost_per_token": 5e-07,
|
||||
"output_cost_per_token": 2.5e-06,
|
||||
"cache_read_input_token_cost": 2e-07,
|
||||
"litellm_provider": "cognition",
|
||||
"mode": "chat",
|
||||
"supports_function_calling": true,
|
||||
|
|
|
|||
|
|
@ -48486,9 +48486,9 @@
|
|||
"source": "https://docs.devin.ai/windsurf/plugins/cascade/models"
|
||||
},
|
||||
"cognition/swe-1.7": {
|
||||
"input_cost_per_token": 2.5e-06,
|
||||
"output_cost_per_token": 1.25e-05,
|
||||
"cache_read_input_token_cost": 1e-06,
|
||||
"input_cost_per_token": 5e-07,
|
||||
"output_cost_per_token": 2.5e-06,
|
||||
"cache_read_input_token_cost": 2e-07,
|
||||
"litellm_provider": "cognition",
|
||||
"mode": "chat",
|
||||
"supports_function_calling": true,
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ class TestCognitionCostTracking:
|
|||
"model, input_cost, output_cost",
|
||||
[
|
||||
("cognition/swe-1.6", 5e-07, 2.5e-06),
|
||||
("cognition/swe-1.7", 2.5e-06, 1.25e-05),
|
||||
("cognition/swe-1.7", 5e-07, 2.5e-06),
|
||||
],
|
||||
)
|
||||
def test_cost_map_entries(self, model: str, input_cost: float, output_cost: float):
|
||||
|
|
@ -136,8 +136,8 @@ class TestCognitionCostTracking:
|
|||
custom_llm_provider="cognition",
|
||||
)
|
||||
|
||||
assert prompt_cost == pytest.approx(2.5)
|
||||
assert completion_cost == pytest.approx(12.5)
|
||||
assert prompt_cost == pytest.approx(0.5)
|
||||
assert completion_cost == pytest.approx(2.5)
|
||||
|
||||
def test_supported_endpoints_matrix(self):
|
||||
matrix = json.loads((Path(litellm.__file__).parent / "provider_endpoints_support_backup.json").read_text())
|
||||
|
|
@ -169,5 +169,5 @@ class TestCognitionRouting:
|
|||
)
|
||||
|
||||
usage = response.usage
|
||||
expected = usage.prompt_tokens * 2.5e-06 + usage.completion_tokens * 1.25e-05
|
||||
expected = usage.prompt_tokens * 5e-07 + usage.completion_tokens * 2.5e-06
|
||||
assert response._hidden_params["response_cost"] == pytest.approx(expected)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue