Skip to content

Official Codebase of 3DCodeVerse

Python

models: every real generation asks for the 65536 ceiling

gaoypenga7ccfa9ca372
diff --git a/harness/codeverse/reference/gate.py b/harness/codeverse/reference/gate.py
index 971f5cb8..03d4869e 100644
--- a/harness/codeverse/reference/gate.py
+++ b/harness/codeverse/reference/gate.py
@@ -87,7 +87,7 @@ def check_plausible(
response_schema=GateAnswer.model_json_schema(),
temperature=temperature,
thinking="low",
- max_output_tokens=2000,
+ max_output_tokens=65_536,
max_wait_s=240.0,
label="reference_gate",
)
diff --git a/harness/codeverse/reference/mismatch.py b/harness/codeverse/reference/mismatch.py
index c6e8036d..45cc615a 100644
--- a/harness/codeverse/reference/mismatch.py
+++ b/harness/codeverse/reference/mismatch.py
@@ -85,7 +85,7 @@ def compare(
images += [ImagePart(path=str(p), label=f"RENDER {i + 1} ({p.stem})") for i, p in enumerate(rens)]
req = ChatRequest(messages=[ChatMessage.user(text, images=images)], system=DIFF_SYSTEM,
response_schema=DiffAnswer.model_json_schema(), temperature=temperature,
- thinking="low", max_output_tokens=3000, max_wait_s=240.0, label="reference_diff")
+ thinking="low", max_output_tokens=65_536, max_wait_s=240.0, label="reference_diff")
try:
resp = model.generate(req)
except ModelError as e:
diff --git a/harness/codeverse/reference/synth.py b/harness/codeverse/reference/synth.py
index da6a17c9..9d3264f8 100644
--- a/harness/codeverse/reference/synth.py
+++ b/harness/codeverse/reference/synth.py
@@ -93,7 +93,7 @@ def image_prompt_plan(spec: Spec, view_names: list[str], *, model: Any, temperat
text = IMAGE_PROMPT_USER.format(brief=brief_text(spec), n_views=len(view_names), views=", ".join(view_names))
req = ChatRequest(messages=[ChatMessage.user(text)], system=IMAGE_PROMPT_SYSTEM,
response_schema=ImagePromptPlan.model_json_schema(), temperature=temperature,
- thinking="low", max_output_tokens=2000, max_wait_s=300.0, label="reference_prompt")
+ thinking="low", max_output_tokens=65_536, max_wait_s=300.0, label="reference_prompt")
try:
resp = model.generate(req)
except ModelError as e:
diff --git a/harness/codeverse/texturing/plan.py b/harness/codeverse/texturing/plan.py
index 6ebb7c4b..514d22b7 100644
--- a/harness/codeverse/texturing/plan.py
+++ b/harness/codeverse/texturing/plan.py
@@ -319,7 +319,7 @@ def material_plan(
messages=[ChatMessage.user(text, images=[ImagePart(path=str(p), label=p.stem) for p in images])],
system="You plan PBR textures for 3D assets. Answer with JSON only.",
response_schema=PlannerOutput.model_json_schema(), temperature=temperature, thinking="low",
- max_output_tokens=8000, max_wait_s=300.0, label="texture_plan",
+ max_output_tokens=65_536, max_wait_s=300.0, label="texture_plan",
)
resp = model.generate(req)
payload = resp.parsed if resp.parsed is not None else parse_json_lenient(resp.text)
diff --git a/harness/codeverse/texturing/scene_pack.py b/harness/codeverse/texturing/scene_pack.py
index 06cbfe87..217c003d 100644
--- a/harness/codeverse/texturing/scene_pack.py
+++ b/harness/codeverse/texturing/scene_pack.py
@@ -148,7 +148,7 @@ def scene_pack_plan(
environment=plan.environment, zones=zones, assets=assets)
req = ChatRequest(messages=[ChatMessage.user(text)], system="You plan texture packs for 3D scenes. JSON only.",
response_schema=PackOutput.model_json_schema(), temperature=temperature, thinking="low",
- max_output_tokens=8000, max_wait_s=300.0, label="scene_texture_pack")
+ max_output_tokens=65_536, max_wait_s=300.0, label="scene_texture_pack")
resp = model.generate(req)
payload = resp.parsed if resp.parsed is not None else parse_json_lenient(resp.text)
try:
diff --git a/harness/codeverse/tracks/brief.py b/harness/codeverse/tracks/brief.py
index b6cb1883..9a81b32f 100644
--- a/harness/codeverse/tracks/brief.py
+++ b/harness/codeverse/tracks/brief.py
@@ -36,7 +36,7 @@ BRIEF_ENV = "CV3D_PLAN_BRIEF"
#: tracks the object-shaped brief applies to (graphics/scene get budgets only)
BRIEF_TRACKS = (Track.STATIC_OBJECT, Track.ARTICULATED_OBJECT)
BRIEF_TEMPLATE = "tracks/brief_object.j2"
-BRIEF_MAX_TOKENS = 9000
+BRIEF_MAX_TOKENS = 65_536
# ----------------------------------------------------------------------------- brief
diff --git a/harness/codeverse/tracks/generation.py b/harness/codeverse/tracks/generation.py
index 9ef53dc8..78d7da40 100644
--- a/harness/codeverse/tracks/generation.py
+++ b/harness/codeverse/tracks/generation.py
@@ -124,7 +124,7 @@ class GenerationTask(BaseModel):
images: list[ImagePart] = Field(default_factory=list)
temperature: float = 0.6
thinking: str = "medium"
- max_output_tokens: int = 32000
+ max_output_tokens: int = 65_536 # the model's declared ceiling; unused tokens cost nothing
timeout_s: int | None = None
max_turns: int = Field(
default=0, description="model turns for an agent session (0 = the harness default)"