-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat: Add AIMLAPI provider support to AI plugins #12379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Introduced AIMLAPI as a supported provider in ai-proxy, ai-request-rewrite, and related schema and documentation. Added a new driver for AIMLAPI, updated provider enums, and clarified documentation to reflect AIMLAPI integration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to add test cases to verify the provider aimlapi, such as https://github.com/apache/apisix/blob/master/t/plugin/ai-request-rewrite.t#L241.
If you are not familiar with test nginx, you can also use ts to complete the test. You can refer to https://github.com/apache/apisix/blob/master/t/plugin/mcp/bridge.spec.ts
If you have problems running the test locally, you can refer to this document to build the environment https://github.com/apache/apisix/blob/master/docs/en/latest/build-apisix-dev-environment-devcontainers.md
Introduces a new test case to verify schema validation when using the 'aimlapi' provider with authorization header in the ai-request-rewrite plugin.
@Baoyuantop Thanks for the note! Test cases for Relevant test output:
|
Hi @D1m7asis, there is a code lint error that needs to be fixed. |
Reformatted the 'provider' enum lists in ai-proxy/schema.lua and ai-request-rewrite.lua to use multi-line arrays for improved readability and maintainability. No functional changes were made.
Hi @D1m7asis, there is also a code lint error that needs to be fixed. |
Sorry, didn’t notice that earlier - fixed the style issue in ai-request-rewrite.t Let me know if anything else needs adjustment 🙌 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried it and it works.
@Baoyuantop @membphis @bzp2010 If that sounds interesting, please send the responsible person's email to sergey@aimlapi.com |
Description
This PR adds AIMLAPI as a supported provider to the
ai-proxy
,ai-proxy-multi
, andai-request-rewrite
plugins in Apache APISIX. AIMLAPI provides a unified OpenAI-compatible API with access to 300+ LLMs such as GPT-4, Claude, Gemini, DeepSeek, and others.Motivation
AIMLAPI is used by over 150,000 developers and organizations as a centralized LLM API gateway. It supports OpenAI-compatible request formats and offers strong uptime, competitive pricing, and access to a wide variety of models. This change enables APISIX users to easily route and proxy requests through AIMLAPI without needing custom drivers or overrides.
What's Changed
✅ Added a new OpenAI-compatible driver:
aimlapi.lua
✅ Updated
provider
enums in:ai-proxy
schemaai-request-rewrite
schemaai-proxy-multi
schema✅ Updated documentation to reflect AIMLAPI as an officially supported provider
✅ Clarified examples, usage, and endpoint behavior for AIMLAPI
✅ Confirmed backwards compatibility and fallback behavior
Test Screenshots:


Which issue(s) this PR fixes:
#12289 — new provider integration
Checklist