Skip to content
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

Support openai embeddings endpoints in ai proxy #1934

Conversation

JohnBlackwell
Copy link
Contributor

Test Plan

Checklist

  • If required, I have updated the Plural documentation accordingly.
  • I have added tests to cover my changes.
  • I have added a meaningful title and summary to convey the impact of this PR to a user.

Copy link

linear bot commented Feb 20, 2025

@JohnBlackwell JohnBlackwell added the enhancement New feature or request label Feb 20, 2025
Copy link
Member

@michaeljguarino michaeljguarino left a comment

Choose a reason for hiding this comment

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

The router here still doesn't really make sense to me. Does it not direct /v1/embeddings to bedrock if that's the underlying provider? And same for the chat requests. We shouldn't be exposing bedrock url paths, it should just be the standard openai url paths.

@@ -153,7 +152,7 @@ func TestBedrockEmbeddingsProxy(t *testing.T) {
{
Name: "embeddings request should return correct openai response",
Method: "POST",
Endpoint: bedrock.EndpointEmbeddings,
Endpoint: "/v1/embeddings",
Copy link
Member

@michaeljguarino michaeljguarino Feb 24, 2025

Choose a reason for hiding this comment

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

this needs to be on the same prefix as the other openai endpoints

Copy link
Contributor Author

@JohnBlackwell JohnBlackwell Feb 24, 2025

Choose a reason for hiding this comment

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

it's not?

EndpointEmbeddings = "/v1/embeddings"

Copy link
Member

Choose a reason for hiding this comment

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

the other endpoints exposed were /openai/v1/chat/completions. You can put it under both, but the openai path prefix is not a bad way to do it.

@JohnBlackwell JohnBlackwell merged commit 4ad6c40 into master Feb 24, 2025
12 checks passed
@JohnBlackwell JohnBlackwell deleted the john/prod-3217-support-openai-embeddings-endpoints-in-ai-proxy branch February 24, 2025 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants