Skip to content

Commit 911b0a7

Browse files
committed
use local litellm model cost map by default
1 parent 092e865 commit 911b0a7

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

services/chat-backend/src/app.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from fastapi.responses import JSONResponse # noqa: E402
1111
from fastapi.routing import APIRoute # noqa: E402
1212
from fastapi.openapi.utils import get_openapi
13+
import os
1314

1415
from src.core.config import get_settings # noqa: E402
1516
from src.middleware import AuditMiddleware # noqa: E402
@@ -18,6 +19,7 @@
1819
from src.utils.openapi_converter import convert_openapi_spec # noqa: E402
1920

2021
config = get_settings()
22+
os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = str(config.LITELLM_LOCAL_MODEL_COST_MAP)
2123
logger = logging.getLogger(__name__)
2224

2325

services/chat-backend/src/core/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class Settings(BaseSettings):
1919
API_PREFIX: str = "/api"
2020
ENVIRONMENT: Literal["development", "staging", "production"] = "production"
2121
NUM_PROXIES: int
22+
LITELLM_LOCAL_MODEL_COST_MAP: bool = True
2223

2324

2425
@lru_cache()

0 commit comments

Comments
 (0)