[Question] How to configure HTTP proxy for ai-proxy plugin to access external AI models? #13393
Unanswered
huanghuang0913
asked this question in
Q&A
Replies: 1 comment
-
|
Unfortunately, the ai-proxy plugin currently does not support HTTP/HTTPS proxy configuration for its outbound requests. This is a confirmed limitation, not a misconfiguration on your side. Why your attempts didn't work:
Workarounds for your situation:
This is a known gap that has been discussed in the community [5]. If this feature is important for your use case, consider opening a feature request issue to add To reply, just mention @dosu. Docs are dead. Just use Dosu. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Environment:
APISIX version: 3.14
Deployment method: Running from source code (started via make run, not Docker)
OS: Linux
Plugin: ai-proxy with provider: openai-compatible
Problem Description
I'm using APISIX's ai-proxy plugin to proxy requests to Alibaba Cloud DashScope (an external AI service at https://dashscope.aliyuncs.com). However, my environment can only access the internet via an HTTP proxy.
Other routes that don't require the proxy (pointing to internal IPs like 10.x.x.x or 172.x.x.x) work fine. But when I try to access the DashScope route via ai-proxy, I get a 500 Internal Server Error.
What I've Tried
I attempted to configure the proxy by adding environment variables in conf/config.yaml like this:
But this configuration doesn't seem to take effect. After restarting APISIX by apisix reload, requests to the external AI endpoint still fail with 500, and there's no evidence that the proxy is being used.
My Route Configuration:
Questions
Additional Context
• Other internal routes (without proxy) work correctly, so APISIX core is functioning.
• I can confirm that the proxy server itself is working (e.g., curl -x my-proxy:port https://dashscope.aliyuncs.com succeeds from the same machine).
Any guidance would be greatly appreciated. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions