Official Codebase of 3DCodeVerse
Python
texture CLI: the default image model's name comes from its one home
gaoypengac00eff3d1e6
diff --git a/harness/codeverse3d/cli/texture_cmd.py b/harness/codeverse3d/cli/texture_cmd.pyindex 9d4a30e8..9773cbd9 100644--- a/harness/codeverse3d/cli/texture_cmd.py+++ b/harness/codeverse3d/cli/texture_cmd.py@@ -1,6 +1,6 @@"""``3dcode texture`` — text-to-image texturing commands.- 3dcode texture pass <slug> [--no-judge] [--model gemini:gemini-3.7-flash] [--image-model gemini-3.1-flash-image]+ 3dcode texture pass <slug> [--no-judge] [--model gemini:gemini-3.7-flash] [--image-model MODEL]3dcode texture scene-pack <slug> [--n 8] [--model ...]3dcode texture show <slug>"""@@ -14,6 +14,7 @@ import typerfrom codeverse3d.cli import _common as Cfrom codeverse3d.cli._common import console, kv_table, warn+from codeverse3d.contracts.common import DEFAULT_IMAGE_MODELfrom codeverse3d.contracts.plan import ScenePlantexture_app = typer.Typer(name="texture", help="Text-to-image texturing: object pass + scene texture pack.",@@ -28,7 +29,7 @@ def pass_(judge: Annotated[bool, typer.Option("--judge/--no-judge", help="before/after VLM ship gate")] = True,model: Annotated[str | None, typer.Option("--model", help="material-plan chat model id (default: spec planner)")] = None,judge_model: Annotated[str | None, typer.Option("--judge-model", help="judge chat model id (default: spec judge)")] = None,- image_model: Annotated[str | None, typer.Option("--image-model", help="gemini image model (default gemini-3.1-flash-image)")] = None,+ image_model: Annotated[str | None, typer.Option("--image-model", help=f"gemini image model (default {DEFAULT_IMAGE_MODEL})")] = None,size: Annotated[int, typer.Option("--size", min=256, max=2048)] = 1024,force: Annotated[bool, typer.Option("--force", help="buy a new pass even if one already started from this GLB")] = False,runs_dir: RunsDirOpt = None,diff --git a/harness/codeverse3d/contracts/common.py b/harness/codeverse3d/contracts/common.pyindex bbbebf20..86492e52 100644--- a/harness/codeverse3d/contracts/common.py+++ b/harness/codeverse3d/contracts/common.py@@ -191,6 +191,10 @@ class Backends(BaseModel):captioner: str = "gemini:gemini-3.7-flash"+#: The text-to-image model (texture pass, scene texture pack, synthetic references) when none is named.+DEFAULT_IMAGE_MODEL = "gemini-3.1-flash-image"++# ------------------------------------------------------------------ joint coupling#: |multiplier| below this is a coupling that transmits no motion. ONE value: the plan#: validator used 1e-9 while the URDF loader and lint used 1e-12, so a coupling thediff --git a/harness/codeverse3d/models/gemini.py b/harness/codeverse3d/models/gemini.pyindex 028cdf8c..f56b6bbf 100644--- a/harness/codeverse3d/models/gemini.py+++ b/harness/codeverse3d/models/gemini.py@@ -34,7 +34,7 @@ from codeverse3d.contracts.chat import (ChatResponse,ImagePart,)-from codeverse3d.contracts.common import Usage+from codeverse3d.contracts.common import DEFAULT_IMAGE_MODEL, Usagefrom codeverse3d.cost.context import AttemptRecord, attempt_sinkfrom codeverse3d.cost.ledger import record_callfrom codeverse3d.cost.types import Role, Stage@@ -535,7 +535,6 @@ class GeminiModel:# ===================================================================== gemini_image-DEFAULT_IMAGE_MODEL = "gemini-3.1-flash-image"FALLBACK_IMAGE_MODEL = "gemini-2.5-flash-image"#: requested pixel size → Gemini ``image_size`` token; a 512 request GENERATES a 1K