Spaces:
Paused
Paused
Add patched start script that loads OpenRouter support
Browse files- start_patched.sh +14 -0
start_patched.sh
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
set -e
|
| 3 |
+
|
| 4 |
+
# Apply OpenRouter patch before starting
|
| 5 |
+
python -c "
|
| 6 |
+
import sys
|
| 7 |
+
sys.path.insert(0, '/app')
|
| 8 |
+
from patches.openrouter_patch import apply_all_patches
|
| 9 |
+
apply_all_patches()
|
| 10 |
+
print('[start] Patches applied successfully')
|
| 11 |
+
" || echo "[start] Patch apply failed (non-fatal)"
|
| 12 |
+
|
| 13 |
+
# Start the backend (same as original start.sh)
|
| 14 |
+
exec uvicorn main:app --host 0.0.0.0 --port 7860 --workers 1
|