Portkey-AI / gateway

A Blazing Fast AI Gateway with integrated Guardrails. Route to 200+ LLMs, 50+ AI Guardrails with 1 fast & friendly API.
https://portkey.ai/features/ai-gateway
MIT License
5.87k stars 403 forks source link

[Feature] API version should be dynamic ? #284

Open AvinashDalvi89 opened 5 months ago

AvinashDalvi89 commented 5 months ago

What Would You Like to See with the Gateway?

As a user, the AI model API version should have dynamic parameters like a model.  Currently, https://github.com/Portkey-AI/gateway/blob/27a6ebbc9ddd972ef1a716176fc17d0b2671c366/src/providers/google/api.ts#L4 is hardcoded. Due to this, we can't test an older model or another version of the of the model. It will be good to have it as a param. 

Context for your Request

This feature will give users the benefit of switching to any AI model API version. For example, Google Gemini has the v1 beta version supported, but tomorrow they will introduce a new version, and then the Portkey gateway will need to update. Instead of this, give dynamic parameters so that the code dependency for the AI model API version change will be removed. 

Your Twitter/LinkedIn

https://twitter.com/AvinashDalvi_ and https://www.linkedin.com/in/avinash-dalvi-315b021a/

narengogi commented 1 month ago

Support for extra params can be added for specific providers. @AvinashDalvi89 would you like to pick it up?

AvinashDalvi89 commented 1 month ago

Yes I can work on this.