diff --git a/test/e2e/test-bedrock-runtime-compatible-anthropic.sh b/test/e2e/test-bedrock-runtime-compatible-anthropic.sh index 76e36354ae2..acca14fa325 100755 --- a/test/e2e/test-bedrock-runtime-compatible-anthropic.sh +++ b/test/e2e/test-bedrock-runtime-compatible-anthropic.sh @@ -710,7 +710,7 @@ for idx, char in enumerate(text): doc = json.loads(text[idx:]) except Exception: continue - payloads = ((doc.get("result") or {}).get("payloads") or []) + payloads = ((doc.get("result") or doc).get("payloads") or []) parts = [p.get("text") for p in payloads if isinstance(p, dict) and isinstance(p.get("text"), str)] print("\n".join(parts)) break diff --git a/test/e2e/test-launchable-smoke.sh b/test/e2e/test-launchable-smoke.sh index bbb04cf1131..8ee5d722b4c 100755 --- a/test/e2e/test-launchable-smoke.sh +++ b/test/e2e/test-launchable-smoke.sh @@ -528,7 +528,7 @@ try: doc = json.load(sys.stdin) except Exception: sys.exit(0) -result = doc.get('result') or {} +result = doc.get('result') or doc parts = [] for p in result.get('payloads') or []: if isinstance(p, dict) and isinstance(p.get('text'), str): diff --git a/test/e2e/test-messaging-compatible-endpoint.sh b/test/e2e/test-messaging-compatible-endpoint.sh index a58069c0fab..20b444aa7f8 100755 --- a/test/e2e/test-messaging-compatible-endpoint.sh +++ b/test/e2e/test-messaging-compatible-endpoint.sh @@ -531,7 +531,7 @@ try: doc = json.load(sys.stdin) except Exception: sys.exit(0) -result = doc.get('result') or {} +result = doc.get('result') or doc parts = [] for p in result.get('payloads') or []: if isinstance(p, dict) and isinstance(p.get('text'), str): diff --git a/test/e2e/test-openclaw-inference-switch.sh b/test/e2e/test-openclaw-inference-switch.sh index 05eb033c424..5fbfefbd335 100755 --- a/test/e2e/test-openclaw-inference-switch.sh +++ b/test/e2e/test-openclaw-inference-switch.sh @@ -281,7 +281,7 @@ try: doc = json.load(sys.stdin) except Exception: sys.exit(0) -result = doc.get("result") or {} +result = doc.get("result") or doc parts = [] for payload in result.get("payloads") or []: if isinstance(payload, dict) and isinstance(payload.get("text"), str): diff --git a/test/e2e/test-sandbox-operations.sh b/test/e2e/test-sandbox-operations.sh index 568e8ac5f5d..b3d42360e1b 100755 --- a/test/e2e/test-sandbox-operations.sh +++ b/test/e2e/test-sandbox-operations.sh @@ -390,7 +390,7 @@ try: doc = json.load(sys.stdin) except Exception: sys.exit(0) -result = doc.get('result') or {} +result = doc.get('result') or doc parts = [] for p in result.get('payloads') or []: if isinstance(p, dict) and isinstance(p.get('text'), str):