Skip to content

Official Codebase of 3DCodeVerse

Python

bench: a PROHIBITED_CONTENT finish (provider content filter mid-JSON) is a provider failure, dropped and redone

ziyao401536f6bc40
diff --git a/harness/bench/_infra.py b/harness/bench/_infra.py
index fdf185f5..959daaa9 100644
--- a/harness/bench/_infra.py
+++ b/harness/bench/_infra.py
@@ -30,6 +30,7 @@ INFRA_MARKERS: tuple[str, ...] = (
"request timed out",
"read operation timed out",
"deadline expired", # Gemini 504
+ "finish_reason=prohibited_content", # the provider's content filter tripped mid-JSON on a furniture plan (2026-08-28): provider behaviour, redone
"exceeded its attempt budget", # models/gemini.py streaming: the provider held the socket past the attempt budget (2026-08-28, pro planner)
"deadline exceeded",
"connection reset",
diff --git a/harness/tests/compare_bench/test_infra_failures.py b/harness/tests/compare_bench/test_infra_failures.py
index 5f127598..cef3133c 100644
--- a/harness/tests/compare_bench/test_infra_failures.py
+++ b/harness/tests/compare_bench/test_infra_failures.py
@@ -330,3 +330,4 @@ def test_stream_attempt_budget_and_504_are_infra():
assert is_infra_failure(RuntimeError("ModelError: Gemini stream exceeded its attempt budget after 293 chunks"))
assert is_infra_failure(RuntimeError("Gemini API error 504: Deadline expired before operation could complete."))
+ assert is_infra_failure(RuntimeError("ModelError: structured output unavailable (finish_reason=PROHIBITED_CONTENT; raise max_output_tokens if truncated)"))