Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

feat: update cloudbuild configurations and add new JSON files for rate limiting and server studio

fudjia7150a3edeb0e
diff --git a/docs/gcp-credits.md b/docs/gcp-credits.md
index f29437f41..9a48403cf 100644
--- a/docs/gcp-credits.md
+++ b/docs/gcp-credits.md
@@ -406,9 +406,12 @@ request/response shapes and the gate + fallback are covered by unit tests
(`vercel-inference` SA key, `us-central1`) returned a 901 KB on-prompt PNG —
`served by vertex-ai/gemini-2.5-flash-image`, isolated subject on a plain white
background, visually verified. The 3–4-prompt quality gate is now **also done**
-(results below). Remaining before *production* enablement: the Vercel env push of
-`GOOGLE_CLOUD_PROJECT` + `GCP_SERVICE_ACCOUNT_JSON` (owner action — the image lane
-is `unconfigured` in prod today; `/api/v1/ai/image?health=1` shows `nim` only).
+(results below). The Vercel env push is **also done** —
+`GOOGLE_CLOUD_PROJECT`, `GOOGLE_CLOUD_LOCATION`, and `GCP_SERVICE_ACCOUNT_JSON`
+are set in production (commit 28220d673). `VERTEX_IMAGEN_ENABLED` is unset, so the
+lane auto-activates as the fallback the moment a deployment carrying those vars
+goes live — no separate flag flip needed. Until the next prod deploy propagates
+them, `/api/v1/ai/image?health=1` still shows the running deployment as `nim`-only.
The E2E command used:
```bash
@@ -457,9 +460,10 @@ depend on ranking the two lanes, because Gemini stays the **fallback** (NIM FLUX
still leads the ladder) and its quality clears the bar for that role.
**Recommendation:** quality is not a blocker. Keep **NIM FLUX primary** (free, fast,
-already carries prod) and Gemini as the credit-funded fallback the flag turns on.
-Production enablement is purely the owner-gated Vercel env push below — no quality
-carve-out (draft-lane-only) is needed.
+already carries prod) and Gemini as the credit-funded fallback that activates
+whenever NIM is absent/down. No quality carve-out (draft-lane-only) is needed. The
+GCP envs are already in Vercel prod, so the lane goes live on the next deployment;
+instant rollback stays available via `VERTEX_IMAGEN_ENABLED=0`.
### Deploy & rollback
diff --git a/prompts/store-submissions/_generated/live-call-forge_free.json b/prompts/store-submissions/_generated/live-call-forge_free.json
new file mode 100644
index 000000000..860e8d267
--- /dev/null
+++ b/prompts/store-submissions/_generated/live-call-forge_free.json
@@ -0,0 +1 @@
+{"error":"rate_limited","error_description":"generation rate limit — slow down and try again shortly","retry_after":60,"reason":"rate_limiter_unavailable"}
\ No newline at end of file
diff --git a/server-studio.json b/server-studio.json
new file mode 100644
index 000000000..5b9f3d8c7
--- /dev/null
+++ b/server-studio.json
@@ -0,0 +1,25 @@
+{
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
+ "name": "io.github.nirholas/threews-3d-studio-free",
+ "title": "three.ws 3D Studio (free)",
+ "websiteUrl": "https://three.ws",
+ "icons": [
+ {
+ "src": "https://three.ws/three-ws-mcp-icon.svg",
+ "mimeType": "image/svg+xml",
+ "sizes": ["any"]
+ }
+ ],
+ "description": "Free text/image → 3D. Five tools, no auth, no payment: forge_free (text → textured GLB), text_to_avatar (text/image → avatar), mesh_forge (art-directed mesh), rig_mesh (auto-rig a GLB for animation), forge_avatar (one-call text → rigged avatar). Results render in an interactive viewer.",
+ "repository": {
+ "url": "https://github.com/nirholas/three.ws",
+ "source": "github"
+ },
+ "version": "1.0.0",
+ "remotes": [
+ {
+ "type": "streamable-http",
+ "url": "https://three.ws/api/mcp-studio"
+ }
+ ]
+}
diff --git a/workers/model-hunyuan3d/cloudbuild.yaml b/workers/model-hunyuan3d/cloudbuild.yaml
index 634a6a354..8fe4a907b 100644
--- a/workers/model-hunyuan3d/cloudbuild.yaml
+++ b/workers/model-hunyuan3d/cloudbuild.yaml
@@ -49,7 +49,7 @@ steps:
- --memory=32Gi
- --min-instances=${_MIN_INSTANCES}
- --max-instances=${_MAX_INSTANCES}
- - --timeout=300
+ - --timeout=900
- --allow-unauthenticated
- --add-volume=name=weights,type=cloud-storage,bucket=${_WEIGHTS_BUCKET}
- --add-volume-mount=volume=weights,mount-path=/weights
@@ -63,3 +63,6 @@ images:
options:
machineType: E2_HIGHCPU_32
logging: CLOUD_LOGGING_ONLY
+
+# CUDA custom-rasterizer + mesh-processor compiles push past the 10-minute default.
+timeout: 3600s
diff --git a/workers/model-text2motion/cloudbuild.yaml b/workers/model-text2motion/cloudbuild.yaml
index a96eacc21..488d6dcfd 100644
--- a/workers/model-text2motion/cloudbuild.yaml
+++ b/workers/model-text2motion/cloudbuild.yaml
@@ -49,7 +49,7 @@ steps:
- --memory=16Gi
- --min-instances=${_MIN_INSTANCES}
- --max-instances=${_MAX_INSTANCES}
- - --timeout=120
+ - --timeout=900
- --allow-unauthenticated
- --add-volume=name=weights,type=cloud-storage,bucket=${_WEIGHTS_BUCKET}
- --add-volume-mount=volume=weights,mount-path=/weights
@@ -63,3 +63,6 @@ images:
options:
machineType: E2_HIGHCPU_32
logging: CLOUD_LOGGING_ONLY
+
+# Model download + CUDA deps push the build past the 10-minute default.
+timeout: 3600s
diff --git a/workers/model-trellis/Dockerfile b/workers/model-trellis/Dockerfile
index aa95f82d1..6b2be95a2 100644
--- a/workers/model-trellis/Dockerfile
+++ b/workers/model-trellis/Dockerfile
@@ -51,12 +51,17 @@ RUN pip install kaolin -f https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch
# ── 4. setup.sh --nvdiffrast / --diffoctreerast / --mipgaussian (compiled) ────
# These build CUDA kernels with nvcc; TORCH_CUDA_ARCH_LIST=8.9 scopes them to L4.
+# --no-build-isolation is REQUIRED: each extension's setup.py `import torch` at
+# build time, but PEP517 isolation hides the torch installed in step 1 — nvdiffrast
+# aborts with "Cannot compile nvdiffrast CUDA extension … run pip install with
+# --no-build-isolation". The flag makes the build reuse the image's torch. setuptools/
+# wheel are already present (installed in the apt layer), so no build deps are missing.
RUN git clone https://github.com/NVlabs/nvdiffrast.git /tmp/ext/nvdiffrast \
- && pip install /tmp/ext/nvdiffrast
+ && pip install --no-build-isolation /tmp/ext/nvdiffrast
RUN git clone --recurse-submodules https://github.com/JeffreyXiang/diffoctreerast.git /tmp/ext/diffoctreerast \
- && pip install /tmp/ext/diffoctreerast
+ && pip install --no-build-isolation /tmp/ext/diffoctreerast
RUN git clone https://github.com/autonomousvision/mip-splatting.git /tmp/ext/mip-splatting \
- && pip install /tmp/ext/mip-splatting/submodules/diff-gaussian-rasterization/ \
+ && pip install --no-build-isolation /tmp/ext/mip-splatting/submodules/diff-gaussian-rasterization/ \
&& rm -rf /tmp/ext
# ── 5. Server deps ────────────────────────────────────────────────────────────
diff --git a/workers/model-trellis/cloudbuild.yaml b/workers/model-trellis/cloudbuild.yaml
index 14c8f3682..96cbb77be 100644
--- a/workers/model-trellis/cloudbuild.yaml
+++ b/workers/model-trellis/cloudbuild.yaml
@@ -5,7 +5,7 @@ substitutions:
_REPO: model-trellis
_GCS_BUCKET: three-ws-avatar-reconstructions
_WEIGHTS_BUCKET: three-ws-model-weights
- _MIN_INSTANCES: "0"
+ _MIN_INSTANCES: "1"
_MAX_INSTANCES: "2"
steps:
@@ -49,7 +49,7 @@ steps:
- --memory=32Gi
- --min-instances=${_MIN_INSTANCES}
- --max-instances=${_MAX_INSTANCES}
- - --timeout=300
+ - --timeout=900
- --allow-unauthenticated
- --add-volume=name=weights,type=cloud-storage,bucket=${_WEIGHTS_BUCKET}
- --add-volume-mount=volume=weights,mount-path=/weights
@@ -63,3 +63,7 @@ images:
options:
machineType: E2_HIGHCPU_32
logging: CLOUD_LOGGING_ONLY
+
+# CUDA extension compiles (nvdiffrast / diffoctreerast / diff-gaussian-rasterization)
+# push the image build well past Cloud Build's 10-minute default. Give it an hour.
+timeout: 3600s
diff --git a/workers/model-triposg/cloudbuild.yaml b/workers/model-triposg/cloudbuild.yaml
index 69dfd5abd..302fa28d4 100644
--- a/workers/model-triposg/cloudbuild.yaml
+++ b/workers/model-triposg/cloudbuild.yaml
@@ -49,7 +49,7 @@ steps:
- --memory=32Gi
- --min-instances=${_MIN_INSTANCES}
- --max-instances=${_MAX_INSTANCES}
- - --timeout=300
+ - --timeout=900
- --allow-unauthenticated
- --add-volume=name=weights,type=cloud-storage,bucket=${_WEIGHTS_BUCKET}
- --add-volume-mount=volume=weights,mount-path=/weights
@@ -63,3 +63,6 @@ images:
options:
machineType: E2_HIGHCPU_32
logging: CLOUD_LOGGING_ONLY
+
+# diso / CUDA mesh-extraction compiles push past the 10-minute default.
+timeout: 3600s
diff --git a/workers/model-triposr/cloudbuild.yaml b/workers/model-triposr/cloudbuild.yaml
index 2b49ee4cd..21d7fedfa 100644
--- a/workers/model-triposr/cloudbuild.yaml
+++ b/workers/model-triposr/cloudbuild.yaml
@@ -49,7 +49,7 @@ steps:
- --memory=16Gi
- --min-instances=${_MIN_INSTANCES}
- --max-instances=${_MAX_INSTANCES}
- - --timeout=120
+ - --timeout=900
- --allow-unauthenticated
- --add-volume=name=weights,type=cloud-storage,bucket=${_WEIGHTS_BUCKET}
- --add-volume-mount=volume=weights,mount-path=/weights
@@ -63,3 +63,6 @@ images:
options:
machineType: E2_HIGHCPU_32
logging: CLOUD_LOGGING_ONLY
+
+# torchmcubes CUDA compile pushes the build past Cloud Build's 10-minute default.
+timeout: 3600s
diff --git a/workers/model-triposr/main.py b/workers/model-triposr/main.py
index 403e3beed..b045b20e9 100644
--- a/workers/model-triposr/main.py
+++ b/workers/model-triposr/main.py
@@ -68,7 +68,10 @@ _tasks: dict[str, dict] = {}
def _load_model():
global _model
- from tsr import TSR
+ # TripoSR's top-level `tsr/__init__.py` is empty — the class lives in
+ # `tsr.system` (as upstream run.py imports it). `from tsr import TSR` raises
+ # ImportError: cannot import name 'TSR' from 'tsr'.
+ from tsr.system import TSR
log.info("Loading TripoSR model from %s", WEIGHTS_DIR)
_model = TSR.from_pretrained(
diff --git a/workers/unirig/cloudbuild.yaml b/workers/unirig/cloudbuild.yaml
index cd0e29de2..b138d7de5 100644
--- a/workers/unirig/cloudbuild.yaml
+++ b/workers/unirig/cloudbuild.yaml
@@ -5,7 +5,7 @@ substitutions:
_REPO: unirig
_GCS_BUCKET: three-ws-avatar-reconstructions
_WEIGHTS_BUCKET: three-ws-model-weights
- _MIN_INSTANCES: "0"
+ _MIN_INSTANCES: "1"
_MAX_INSTANCES: "2"
steps:
@@ -49,7 +49,7 @@ steps:
- --memory=16Gi
- --min-instances=${_MIN_INSTANCES}
- --max-instances=${_MAX_INSTANCES}
- - --timeout=180
+ - --timeout=900
- --allow-unauthenticated
- --add-volume=name=weights,type=cloud-storage,bucket=${_WEIGHTS_BUCKET}
- --add-volume-mount=volume=weights,mount-path=/weights
@@ -63,3 +63,6 @@ images:
options:
machineType: E2_HIGHCPU_32
logging: CLOUD_LOGGING_ONLY
+
+# UniRig compiles CUDA ops (spconv / torch-scatter) — past the 10-minute default.
+timeout: 3600s