ci(cost map): delete the model prices JSON schema file (#47079)

* chore(cost map): delete the unused model prices JSON schema

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* ci(cost map): remove interim schema sync compatibility

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Mateo Wang 2026-10-21 01:46:03 +00:00 • committed by GitHub
parent 41890bdf64
commit c515f80f82
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 3 additions and 1325 deletions

View file

@ -33,7 +33,7 @@ while IFS= read -r file || [ -n "$file" ]; do
*) has_backend=true ;;
esac
case "$file" in
model_prices_and_context_window.json | litellm/model_prices_and_context_window_backup.json | model_prices_and_context_window.schema.json)
model_prices_and_context_window.json | litellm/model_prices_and_context_window_backup.json)
has_cost_map=true ;;
tests/unit/proxy/*) : ;;
*) outside_cost_map_set=true ;;

View file

@ -4,8 +4,7 @@ Every pull request whose diff against its merge base touches one of the two cost
checks: the files parse and the backup copy matches the root file. A pull request that leaves both untouched
skips them, since merging it keeps the base branch's copies and its head tree only carries whatever state the
branch was cut from. Pull requests from the cost map sync bot (branches named litellm_cost_map_sync_*) always
get the file checks and additionally may only touch those two files or the legacy schema
path and may only add or update models.
get the file checks and additionally may only touch those two files and may only add or update models.
"""
from __future__ import annotations
@ -21,7 +20,6 @@ from typing import Final
COST_MAP_PATH: Final = "model_prices_and_context_window.json"
BACKUP_PATH: Final = "litellm/model_prices_and_context_window_backup.json"
LEGACY_SCHEMA_PATH: Final = "model_prices_and_context_window.schema.json"
GUARDED_PATHS: Final = (COST_MAP_PATH, BACKUP_PATH)
BOT_BRANCH_PREFIX: Final = "litellm_cost_map_sync_"
SPECIAL_ROOT_KEYS: Final = frozenset({"sample_spec", "fallback_generalizations"})
@ -110,7 +108,7 @@ def _bot_failures(base: Snapshot, head_map: CostMap, changed_files: Sequence[str
*(
f"bot PRs may only change the cost map files, not {path}"
for path in changed_files
if path not in GUARDED_PATHS and path != LEGACY_SCHEMA_PATH
if path not in GUARDED_PATHS
),
*(f"bot PRs may not remove models: {key}" for key in base_map if key not in head_map),
*(f"bot PRs may not remove fields: {ref}" for ref in removed_fields),

File diff suppressed because it is too large Load diff

View file

@ -96,7 +96,6 @@ CI = [".github/workflows/test-unit.yml"]
("ui", BACKEND + CLIENT, "run"),
("cost-map-only", ["model_prices_and_context_window.json"], "run"),
("cost-map-only", ["litellm/model_prices_and_context_window_backup.json"], "run"),
("cost-map-only", ["model_prices_and_context_window.schema.json"], "run"),
(
"cost-map-only",
["model_prices_and_context_window.json", "tests/unit/proxy/test_y.py"],

View file

@ -186,13 +186,6 @@ def test_bot_may_only_touch_the_cost_map_files() -> None:
)
def test_bot_may_update_cost_map_and_legacy_schema() -> None:
head: Final = _snapshot({**BASE_MAP, "openrouter/c": _entry()})
changed: Final = (*guard.GUARDED_PATHS, guard.LEGACY_SCHEMA_PATH)
assert _failures(head, changed_files=changed) == ()
def test_bot_may_not_remove_models() -> None:
head = _snapshot({key: value for key, value in BASE_MAP.items() if key != "openrouter/b"})
assert _failures(head, bot=False) == ()