feat: add custom openai host endpoint #1349
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a first start at adding a custom openai-compatible endpoint. I have this working with my LiteLLM proxy.
Some open issues I've caught so far:
/models
endpoint that I believe most openai-compatible APIs should have.Consequently, the "browse models" link doesn't do anything
Could also add the ability to pass in the model(s) during configuring it.
Could also add the ability to provide multiple custom openai-compatible models but would increase the scope a lot, I would imagine. Could be done in a follow up if there's enough demand.
I'm open to any opinions here for how to handle these issues or postpone for now.
Closes: #885