Spaces:
Sleeping
Sleeping
David Prince
fix: add all missing local module stubs (remote_mcp_registry, mcp_auth, mcp_transport, etc)
cce8120 | set -euo pipefail | |
| ROOT="/root/projects/website-builder-backend-clean" | |
| cd "$ROOT" | |
| echo "========================================" | |
| echo "Replacing Provider Dispatch" | |
| echo "========================================" | |
| mkdir -p backups | |
| cp -a backend/llm/providers backups/providers.$(date +%Y%m%d_%H%M%S) | |
| python3 <<'PY' | |
| from pathlib import Path | |
| providers=Path("backend/llm/providers") | |
| replacement=''' | |
| from backend.llm.gateway import LLMGateway | |
| _gateway = LLMGateway() | |
| async def generate( | |
| model: str, | |
| prompt: str, | |
| **kwargs | |
| ): | |
| return await _gateway.generate( | |
| model=model, | |
| prompt=prompt, | |
| **kwargs | |
| ) | |
| ''' | |
| patched=0 | |
| for f in providers.glob("*.py"): | |
| if f.name=="__init__.py": | |
| continue | |
| if f.name.startswith("_"): | |
| continue | |
| f.write_text(replacement,encoding="utf-8") | |
| patched+=1 | |
| print(f"Providers replaced: {patched}") | |
| PY | |
| echo | |
| python3 -m compileall backend/llm | |
| echo | |
| echo "[OK] Provider dispatch unified through Dolor3V gateway" | |