This commit is contained in:
mike
2025-12-11 01:53:06 +01:00
parent 56bc1cb21b
commit 3f9acb08ec
4 changed files with 4 additions and 707 deletions

View File

@@ -228,7 +228,10 @@ $prompt"
}')
;;
*)
payload=$(echo "$base_payload" | jq '. + {response_format: {type: "json_object"}}')
# Default OpenAI-compatible providers increasingly expect
# response_format.type to be either "text" or a json_schema.
# Use "text" for maximum compatibility to avoid 400 errors.
payload=$(echo "$base_payload" | jq '. + {response_format: {type: "text"}}')
;;
esac
echo "$payload"