← back to Designer Wallcoverings
Disable Gemini thinking budget on capped enrichment calls (thinkingConfig.thinkingBudget=0)
a141052539557a0d7d4e1c1fca864a8893e66b1e · 2026-06-23 07:51:16 -0700 · Steve Abrams
gemini-3.5-flash is a thinking model; the inherited maxOutputTokens caps
(10-1024) were consumed by hidden reasoning tokens, yielding HTTP 200 with
truncated/empty bodies. Setting thinkingBudget=0 restores 2.0-flash behavior,
revalidates existing caps, and removes thinking-token cost. 79 files.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Files touched
A shopify/push-collection-revert-live.sh
Diff
commit a141052539557a0d7d4e1c1fca864a8893e66b1e
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Tue Jun 23 07:51:16 2026 -0700
Disable Gemini thinking budget on capped enrichment calls (thinkingConfig.thinkingBudget=0)
gemini-3.5-flash is a thinking model; the inherited maxOutputTokens caps
(10-1024) were consumed by hidden reasoning tokens, yielding HTTP 200 with
truncated/empty bodies. Setting thinkingBudget=0 restores 2.0-flash behavior,
revalidates existing caps, and removes thinking-token cost. 79 files.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
shopify/push-collection-revert-live.sh | 49 ++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/shopify/push-collection-revert-live.sh b/shopify/push-collection-revert-live.sh
new file mode 100644
index 00000000..45ca8579
--- /dev/null
+++ b/shopify/push-collection-revert-live.sh
@@ -0,0 +1,49 @@
+#!/usr/bin/env bash
+# Deploy the section->snippet fix for collection-filters-horizontal to the LIVE theme.
+# Pushes the SNIPPET FIRST (so collection.liquid's {% render %} target exists), then
+# collection.liquid. Resolves live as role==main dynamically. Backs up + verifies each.
+# bash push-collection-revert-live.sh
+set -euo pipefail
+cd "$(dirname "$0")"
+STORE="designer-laboratory-sandbox.myshopify.com"; API="2024-10"
+SECRETS="$HOME/Projects/secrets-manager/.env"
+TOK="${THEME_TOKEN:-$(grep -hE '^SHOPIFY_THEME_TOKEN=' "$SECRETS" 2>/dev/null | head -1 | cut -d= -f2- | tr -d '"'"'"' ')}"
+[ -z "$TOK" ] && { echo "No theme token"; exit 1; }
+mkdir -p theme-backups
+python3 - "$STORE" "$API" "$TOK" <<'PY'
+import sys,json,urllib.request,urllib.parse,datetime,re
+store,api,tok=sys.argv[1:4]
+H={"X-Shopify-Access-Token":tok,"Content-Type":"application/json"}
+def gget(u): return json.load(urllib.request.urlopen(urllib.request.Request(u,headers=H)))
+themes=gget(f"https://{store}/admin/api/{api}/themes.json")["themes"]
+tid=str(next(t["id"] for t in themes if t["role"]=="main"))
+print("LIVE (role=main) theme:",tid)
+def aurl(k): return f"https://{store}/admin/api/{api}/themes/{tid}/assets.json?"+urllib.parse.urlencode({"asset[key]":k})
+stamp=datetime.datetime.now().strftime("%Y%m%d-%H%M%S")
+# order matters: snippet first, then collection.liquid
+plan=[("snippets/collection-filters-horizontal.liquid","_cwGRID/snippets/collection-filters-horizontal.liquid"),
+ ("sections/collection.liquid","_cwGRID/sections/collection.liquid")]
+for key,localp in plan:
+ new=open(localp,encoding="utf-8").read()
+ try:
+ cur=gget(aurl(key))["asset"]["value"]
+ bk=f"theme-backups/{key.replace('/','__')}.MAIN-{tid}.{stamp}.bak"; open(bk,"w").write(cur)
+ print(f" backup {key}: {bk} ({len(cur)}b)")
+ except Exception as e:
+ print(f" backup {key}: SKIP ({e})")
+ body=json.dumps({"asset":{"key":key,"value":new}}).encode()
+ r=urllib.request.urlopen(urllib.request.Request(f"https://{store}/admin/api/{api}/themes/{tid}/assets.json",data=body,method="PUT",headers=H))
+ print(f" PUT {key} -> HTTP {r.status} ({len(new)}b)")
+# verify
+coll=gget(aurl("sections/collection.liquid"))["asset"]["value"]
+snip=gget(aurl("snippets/collection-filters-horizontal.liquid"))["asset"]["value"]
+print("verify: no section-inside-section in collection.liquid:", not re.search(r"{%-?\s*section\s+'collection-filters-horizontal'",coll))
+print("verify: render call present:", "render 'collection-filters-horizontal'" in coll)
+print("verify: snippet present on live:", len(snip)>0, f"({len(snip)}b)")
+PY
+echo "=== verify LIVE pages render clean ==="
+sleep 3
+for c in phyllis-morris-classic-wallcovering animal-skin new-arrivals grasscloth all; do
+ err=$(curl -sS -A "Mozilla/5.0" "https://www.designerwallcoverings.com/collections/$c?_cb=$(date +%s)" | grep -oE "Liquid error \(sections/collection line [0-9]+\)[^<]*" | head -1)
+ printf " %-38s %s\n" "$c" "${err:-OK}"
+done
← 2a4e2a61 auto-save: 2026-06-23T07:50:15 (83 files) — DW-Agents/dw-age
·
back to Designer Wallcoverings
·
Cap Gemini thinking budget (thinkingBudget=0) on remaining u c40bab9f →