Add debug output for OpenRouter request body

Prints the OpenRouter API request body in the workflow using jq for easier debugging and inspection of outgoing requests.
This commit is contained in:
手瓜一十雪 committed 2025-11-13 19:59:36 +08:00
1 parent 5638127813
commit fcd2619338
1 file changed
+3
+3
View File
@@ -234,6 +234,9 @@ jobs:
--arg user "$USER_CONTENT" \
'{model: env.OPENROUTER_MODEL, messages:[{role:"system", content:$system},{role:"user", content:$user}], temperature:0.2, max_tokens:800}')
echo "=== OpenRouter request body ==="
echo "$BODY" | jq .
# 调用 OpenRouter
RESPONSE=$(curl -s -X POST "$OPENROUTER_API_URL" \
-H "Authorization: Bearer $OPENROUTER_API_KEY" \