openai-node
openai-node copied to clipboard
Enable the use of OpenAI with custom authentication in scenarios where a proxy is in place before accessing the OpenAI service.
Confirm this is a feature request for the Node library and not the underlying OpenAI API.
- [x] This is a feature request for the Node library
Describe the feature or improvement you're requesting
Enable the use of OpenAI with custom authentication in scenarios where a proxy is in place before accessing the OpenAI service.
- Initialize OpenAI with a custom authentication token and send a request to a proxy that handles the POST /api/chat/completions API.
- The proxy validates the custom authentication token and forwards the request to OpenAI using the actual OpenAI API key.
Additional context
No response
You can configure proxies today, have you tried that? https://github.com/openai/openai-node?tab=readme-ov-file#configuring-an-https-agent-eg-for-proxies
The proxy setup has changed slightly in v5 fyi https://github.com/openai/openai-node#configuring-proxies
Closing this, please re-open if configuring a proxy does not work for you use case!