The AI Tools Test Runner internally enables SSL for http URLs

Hello,

I wanted to test the following AI tool:

/* eslint-disable  no-unused-vars */
function invoke(params) {
  const target = "http://stable-diffusion:7860/";
  try {
    const r = http.get(target);
    return { ok: true, status: r.status, len: (r.body||"").length };
  } catch (e) {
    return { ok: false, target, error: String(e) };
  }
}

where http://stable-diffusion:7860/ is an internal endpoint.

Unfortunately, http.get or http.post internally uses SSL, even though it is called with only http://:

Test result
ok: false
target: http://stable-diffusion:7860/
error: Error: SSL_connect returned=1 errno=0 peeraddr=172.18.0.40:7860 state=error: wrong version number

Although stable-diffusion is correctly resolved to 172.18.0.40, a “handshake” error occurs in between.

In the settings under “Allowed internal hosts”, “stable-diffusion” is already listed.

Could you please take a look at this? Thank you very much.