From 79f1d48bd4689fd6c72557bc6f8fd3d2d2130242 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 10 Jul 2026 23:36:01 +0000 Subject: [PATCH] test(cost): resolve model map from repository path --- tests/test_litellm/test_router_model_cost_isolation.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_litellm/test_router_model_cost_isolation.py b/tests/test_litellm/test_router_model_cost_isolation.py index 3baa2f00d98..999d2ae5140 100644 --- a/tests/test_litellm/test_router_model_cost_isolation.py +++ b/tests/test_litellm/test_router_model_cost_isolation.py @@ -11,6 +11,7 @@ import copy import json import os import sys +from pathlib import Path from unittest.mock import patch import pytest @@ -462,7 +463,10 @@ def test_openai_compatible_glm_partial_pricing_inherits_cache_rate(): } try: - with open("model_prices_and_context_window.json", "r") as model_prices_file: + model_prices_path = ( + Path(__file__).parents[2] / "model_prices_and_context_window.json" + ) + with model_prices_path.open(encoding="utf-8") as model_prices_file: model_cost = json.load(model_prices_file) litellm.register_model({backend_model: model_cost[backend_model]})