Skip to content

feat(ai-proxy): support proxying openai compatible LLMs#12004

Merged
shreemaan-abhishek merged 12 commits into
apache:masterfrom
shreemaan-abhishek:ai-proxy-openai-compatible
Mar 1, 2025
Merged

feat(ai-proxy): support proxying openai compatible LLMs#12004
shreemaan-abhishek merged 12 commits into
apache:masterfrom
shreemaan-abhishek:ai-proxy-openai-compatible

Conversation

@shreemaan-abhishek

Copy link
Copy Markdown
Contributor

Description

This PR introduces a new provider openai-compatible that can proxy requests to openai compatible LLMs.

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. enhancement New feature or request labels Feb 27, 2025
nic-6443
nic-6443 previously approved these changes Feb 28, 2025
Comment thread apisix/plugins/ai-drivers/openai-base.lua Outdated
request_table[opt] = val
end
end
params.body = core.json.encode(request_table)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it may fail, need to capture the error case

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread apisix/plugins/ai-proxy/schema.lua Outdated
description = "Name of the AI service provider.",
oneOf = { "openai" }, -- add more providers later

enum = { "openai", "openai-compatible" }, -- add more providers later

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing deepseek?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@shreemaan-abhishek
shreemaan-abhishek merged commit 88164f4 into apache:master Mar 1, 2025
@shreemaan-abhishek
shreemaan-abhishek deleted the ai-proxy-openai-compatible branch March 1, 2025 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants