Skip to content

Commit 180f9bd

Browse files
committed
only set env var if not present
1 parent 911b0a7 commit 180f9bd

File tree

1 file changed

+2
-1
lines changed
  • services/chat-backend/src

1 file changed

+2
-1
lines changed

services/chat-backend/src/app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
from src.utils.openapi_converter import convert_openapi_spec # noqa: E402
2020

2121
config = get_settings()
22-
os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = str(config.LITELLM_LOCAL_MODEL_COST_MAP)
22+
if not os.environ.get("LITELLM_LOCAL_MODEL_COST_MAP"):
23+
os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = str(config.LITELLM_LOCAL_MODEL_COST_MAP)
2324
logger = logging.getLogger(__name__)
2425

2526

0 commit comments

Comments
 (0)