mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-16 09:22:22 +00:00
test(together_ai): check dedicated-only dates against a fixed probe day
Some checks failed
Cost map pins recheck / rerun-cost-map-guard (push) Has been cancelled
LiteLLM Rust DB / db-queries (push) Has been cancelled
LiteLLM Rust / rust-lint (push) Has been cancelled
LiteLLM Rust / rust-test (push) Has been cancelled
LiteLLM Rust / rust-wheel (push) Has been cancelled
Terraform Modules / fmt, validate, test (aws) (push) Has been cancelled
Terraform Modules / fmt, validate, test (gcp) (push) Has been cancelled
Terraform Provider / gofmt, vet, build, test (push) Has been cancelled
Terraform Provider / Provider endpoints vs proxy OpenAPI schema (push) Has been cancelled
Some checks failed
Cost map pins recheck / rerun-cost-map-guard (push) Has been cancelled
LiteLLM Rust DB / db-queries (push) Has been cancelled
LiteLLM Rust / rust-lint (push) Has been cancelled
LiteLLM Rust / rust-test (push) Has been cancelled
LiteLLM Rust / rust-wheel (push) Has been cancelled
Terraform Modules / fmt, validate, test (aws) (push) Has been cancelled
Terraform Modules / fmt, validate, test (gcp) (push) Has been cancelled
Terraform Provider / gofmt, vet, build, test (push) Has been cancelled
Terraform Provider / Provider endpoints vs proxy OpenAPI schema (push) Has been cancelled
This commit is contained in:
parent
0f28d7de7f
commit
a1c28e03f3
1 changed files with 13 additions and 5 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import datetime
|
||||
import json
|
||||
from pathlib import Path
|
||||
from typing import Final
|
||||
|
|
@ -6,7 +7,6 @@ import pytest
|
|||
from pydantic import TypeAdapter
|
||||
|
||||
from litellm.cost_calculator import default_image_cost_calculator
|
||||
from litellm.litellm_core_utils.model_retirement import is_hidden_as_retired
|
||||
from litellm.types.utils import ModelInfo
|
||||
|
||||
REPO_ROOT: Final = Path(__file__).parents[2]
|
||||
|
|
@ -40,6 +40,7 @@ SERVERLESS_CHAT_MODELS: Final = (
|
|||
|
||||
# Absent from https://api.together.ai/v1/models?serverless=true and refused by a direct call on 2026-10-30,
|
||||
# rnj-1-instruct on 2026-11-14
|
||||
LAST_PROBED: Final = datetime.date(2026, 11, 14)
|
||||
DEDICATED_ONLY_MODELS: Final = (
|
||||
"together_ai/BAAI/bge-base-en-v1.5",
|
||||
"together_ai/MiniMaxAI/MiniMax-M2.7",
|
||||
|
|
@ -154,11 +155,18 @@ def _together_rows(cost_map: CostMap, mode: str) -> tuple[tuple[str, dict[str, o
|
|||
)
|
||||
|
||||
|
||||
def test_together_dedicated_only_rows_stay_off_the_model_list(cost_map: CostMap):
|
||||
listed: Final = tuple(
|
||||
model for model in DEDICATED_ONLY_MODELS if model in cost_map and not is_hidden_as_retired(cost_map[model])
|
||||
def _deprecated_by(info: dict[str, object], day: datetime.date) -> bool:
|
||||
deprecation_date: Final = info.get("deprecation_date")
|
||||
return isinstance(deprecation_date, str) and datetime.date.fromisoformat(deprecation_date) <= day
|
||||
|
||||
|
||||
def test_together_dedicated_only_rows_are_deprecated_by_their_last_probe(cost_map: CostMap):
|
||||
undated: Final = tuple(
|
||||
model
|
||||
for model in DEDICATED_ONLY_MODELS
|
||||
if model in cost_map and not _deprecated_by(cost_map[model], LAST_PROBED)
|
||||
)
|
||||
assert listed == ()
|
||||
assert undated == ()
|
||||
|
||||
|
||||
def _routed_mode(cost_map: CostMap, info: dict[str, object]) -> object:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue