← back to Designer Wallcoverings
color cleaner v2: disable gemini-2.5-flash thinking budget (thinkingBudget:0) — 40-token budget was eaten by reasoning → empty text → false-removes; canary now keeps 32/50 blue correctly
80b183f9df60af93bd6899db978a3515a32c7f4b · 2026-06-12 12:45:13 -0700 · Steve Abrams
Files touched
M DW-Programming/color-collection-cleaner-v2.js
Diff
commit 80b183f9df60af93bd6899db978a3515a32c7f4b
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Fri Jun 12 12:45:13 2026 -0700
color cleaner v2: disable gemini-2.5-flash thinking budget (thinkingBudget:0) — 40-token budget was eaten by reasoning → empty text → false-removes; canary now keeps 32/50 blue correctly
---
DW-Programming/color-collection-cleaner-v2.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/DW-Programming/color-collection-cleaner-v2.js b/DW-Programming/color-collection-cleaner-v2.js
index c419f21b..747ef676 100644
--- a/DW-Programming/color-collection-cleaner-v2.js
+++ b/DW-Programming/color-collection-cleaner-v2.js
@@ -116,7 +116,10 @@ Q1 COLOR: Is the PRODUCT primarily ${cfg.word}? Consider ${cfg.consider} as this
Q2 BANNER: Does the IMAGE have any burned-in vendor banner, watermark, website URL, logo text, label box, or a strip/row of color swatches overlaid on the photo? A clean edge-to-edge wallpaper pattern with NO overlay = NO.
Answer on ONE line EXACTLY: "COLOR=YES|NO (dominant) BANNER=YES|NO"` },
{ inline_data: { mime_type: 'image/jpeg', data: b64 } } ] }],
- generationConfig: { temperature: 0.1, maxOutputTokens: 40 } });
+ // gemini-2.5-flash is a thinking model — without thinkingBudget:0 it spends the
+ // output budget on internal reasoning and returns finishReason=MAX_TOKENS with an
+ // EMPTY text part, which the parser reads as "not this color" → false-removes. (2026-06-12)
+ generationConfig: { temperature: 0.1, maxOutputTokens: 60, thinkingConfig: { thinkingBudget: 0 } } });
for (let a = 1; a <= 5; a++) {
try { const v = await callGemini(body);
return { color: /COLOR=YES/i.test(v), banner: /BANNER=YES/i.test(v), raw: v };
← 631cb8bf color cleaner v2: use gemini-2.5-flash (2.0-flash retired 20
·
back to Designer Wallcoverings
·
color cleaner v2: store-agnostic collection resolver — verif 5672b1c4 →