-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Opencode is picking random ports to connect to LM Studio #2442
Description
Hello!
I've recently set up Opencode 0.6.4 to connect to LM Studio. LM Studio is running on "PC A", and Opencode is on "PC B". I'm running an SSH tunnel to open port 1234 on PC B to connect to port 1234 on PC A. When I execute commands via curl, it returns as expected. When I try to connect to models running on PC A, using opencode running on PC B, it seems to pick a random dynamic port for this job? I don't understand what's happening, but the traffic isn't even making it over the SSH tunnel (which I can monitor via verbose mode.)
In the screenshot below, the left shows my openconde.json config and a curl command behaving as expected. The right shows opencode with an error message using a random port number to attempt to connect to LM Studio.
OS: PC A = Windows 11, PC B = MacOS 15.6.1, using Terminal.