Initial commit: LiteLLM config + docker-compose + helper scripts

This commit is contained in:
2026-05-27 00:55:23 +00:00
commit 2466db43b3
13 changed files with 762 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
import subprocess
# Read current proxy
with open("/opt/ai-proxy/proxy.py") as f:
code = f.read()
# Remove gemini-1 provider (from "name": "gemini-1" to the closing },)
import re
code = re.sub(
r'\s*\{\s*\n\s*"name":\s*"gemini-1",.*?\n\s*\},',
'',
code,
flags=re.DOTALL
)
with open("/opt/ai-proxy/proxy.py", "w") as f:
f.write(code)
print("Gemini removed!")
subprocess.run(["systemctl", "restart", "ai-proxy"], capture_output=True)
print("Proxy restarted!")