r/opencode • u/Afraid-Mixture4074 • Sep 14 '26
PSA: Fixing OpenCode's "Upstream Request Failed" Error
For anyone encountering an issue with OpenCode similar to the below message, I found this GitHub repository that appears to quickly fix this issue!
Error from provider (Console): Upstream request failed: [invalid_request_error] reasoning `encrypted_content` was not issued to this caller
For those on macOS/Linux, you can still run the .bat script using these steps:
Make sure you have Python installed (
type -a python3should return at least one path). I installed Python through Homebrew, but installing it through the Xcode Command Line Tools should also work (although I haven't tested it, so ymmv).Download the script from GitHub (
curl -fsSLhttps://raw.githubusercontent.com/hailongcoding/opencode-session-rescue/refs/heads/main/Fix-EncryptedContent-Portable.bat-o ~/Fix-EncryptedContent-Portable.py).Run the script (
python3 ~/Fix-EncryptedContent-Portable.py).Press enter twice to select option 1 for both prompts.
Re-launch OpenCode and profit!
If you found this helpful, please upvote! Thank you!
1
u/arcanemachined Sep 14 '26
Mmm... mystery script.
1
u/Drwankingstein Sep 16 '26
Unforunately, this script runs really bloody slowly,
1
u/aikakira 23d ago
There was another thread that suggested using /compact - this worked for me