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
+34
View File
@@ -0,0 +1,34 @@
import re, subprocess
# Read current proxy
with open("/opt/ai-proxy/proxy.py") as f:
code = f.read()
# Add groq-3 provider after groq-2
old = ''' "priority": 11,
},'''
new = ''' "priority": 11,
},
{
"name": "groq-3",
"client": lambda: AsyncOpenAI(
api_key=os.getenv("GROQ_API_KEY_3"),
base_url="https://api.groq.com/openai/v1"
),
"models": [
"llama-3.1-8b-instant",
"llama-3.3-70b-versatile",
],
"priority": 12,
},'''
code = code.replace(old, new)
with open("/opt/ai-proxy/proxy.py", "w") as f:
f.write(code)
print("Added groq-3 provider!")
subprocess.run(["systemctl", "restart", "ai-proxy"], capture_output=True)
print("Proxy restarted!")