Node Express server stopped working properly overnight?

Question: I have an always-on node express server that worked great last night, but now is failing on a fetch request to openrouter.ai every time. That exact same set of code is working fine when put into a fresh repl. What gives?

Repl link/Link to where the bug appears: Private Repl.

Screenshots, links, or other helpful context:

Here’s the error that is being provided:

Error occurred during chat completion:  FetchError: request to https://openrouter.ai/api/v1/chat/completions failed, reason: Client network socket disconnected before secure TLS connection was established undefined FetchError: request to https://openrouter.ai/api/v1/chat/completions failed, reason: Client network socket disconnected before secure TLS connection was established
    at ClientRequest.<anonymous> (/nix/store/qpnf0dafrfsbcwb4z7cphjm0dff0vl7l-prybar-nodejs-0.0.0-e0d9a52/prybar_assets/nodejs/node_modules/@replit/node-fetch/index-3a548b1a.js:2013:11)
    at ClientRequest.emit (node:events:525:35)
    at ClientRequest.emit (node:domain:489:12)
    at TLSSocket.socketErrorListener (node:_http_client:494:9)
    at TLSSocket.emit (node:events:513:28)
    at TLSSocket.emit (node:domain:489:12)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3) |request to https://openrouter.ai/api/v1/chat/completions failed, reason: Client network socket disconnected before secure TLS connection was established

I’ve created a ticket for you in our ticketing system and will follow up with you there.