It seems that when the response is long, BTT never returns the output. Is there any limit set for the length of the output?
It seems to be happening both when calling the action from a script (like this) and in the BTT GUI.
Simply asking "Write a short story" is fine, but "Write a long story" fails.
I've tested this on Version: 5.160 (2025020204), and it is working fine. I've even tried with "really long story". Just of curiosity - have you tried with "Copy Response To Clipboard"?
You can also check the logs in ~/Library/Application Support/BetterTouchTool/Logs they should contain response info in case of failures
BetterTouchTool also only comes with a limited amount of free API usage distributed among all users. If the daily quota is reached, only providing a custom OpenAI token will help. (Then you can also choose more powerful models)
I checked the log, and OpenAI does return the 200 response and the long story successfully. It just doesn't return the response for those long outputs.
In AppleScript it says "missing value".
in Javascript it says "null"
I tried it after updating to 5.160, and sometimes it works fine (I can paste it), but sometimes it doesn't.
It seems setting to a variable is working all the time!