I'm using OpenRouter on a corporate network and need to access it through a proxy. Does the OpenRouter SDK support proxy settings?
Does it support the same settings as the OpenAI SDK, or is there another way? I couldn't find any relevant information in the documentation
import OpenAI from 'openai';
import * as undici from 'undici';
const proxyAgent = new undici.ProxyAgent('http://localhost:8888');
const client = new OpenAI({
fetchOptions: {
dispatcher: proxyAgent,
},
});