From 0105e321d26b67ecd9c1cbb397d15673bb9d5efb Mon Sep 17 00:00:00 2001 From: Shaun Arman Date: Sun, 12 Apr 2026 16:03:27 -0500 Subject: [PATCH] fix: add diagnostics to identify empty Ollama response root cause --- .gitea/workflows/pr-review.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/pr-review.yml b/.gitea/workflows/pr-review.yml index 5838cfb9..c4c485fc 100644 --- a/.gitea/workflows/pr-review.yml +++ b/.gitea/workflows/pr-review.yml @@ -41,14 +41,17 @@ jobs: --arg model "qwen3-coder-next:latest" \ --arg content "$PROMPT" \ '{model: $model, messages: [{role: "user", content: $content}], stream: false}') + echo "Request body length: ${#BODY} bytes" + echo "Request body (first 200 chars): ${BODY:0:200}" echo "Calling Ollama API..." HTTP_CODE=$(curl -s -o /tmp/ollama_response.json -w "%{http_code}" \ -X POST "$OLLAMA_URL/api/chat" \ -H "Content-Type: application/json" \ -d "$BODY") echo "HTTP status: $HTTP_CODE" - echo "Response body:" - cat /tmp/ollama_response.json + echo "Response file size: $(wc -c < /tmp/ollama_response.json) bytes" + echo "Response body (jq pretty-print or raw):" + jq . /tmp/ollama_response.json 2>/dev/null || cat /tmp/ollama_response.json if [ "$HTTP_CODE" != "200" ]; then echo "ERROR: Ollama returned HTTP $HTTP_CODE" exit 1