[GH-ISSUE #4440] Add support for third-party hosted APIs #28532

Open
opened 2026-04-22 06:46:46 -05:00 by GiteaMirror · 9 comments
Owner

Originally created by @19h on GitHub (May 14, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/4440

We've been coding against the Ollama API internally and eventually it hit me .. Ollama should be able to support third-party API providers, making it a de-facto gateway to LLMs.

For example, it would easily blur the lines between an OpenAI's assistant / user and a Gemini model / user conversation; it could transparently speak Cohere Command R+ completion-like while eloquently talking to Claude, too.

Might sound utterly off-topic, but think about it.

I implemented a hard-coded model into Ollama for local use so I can use unsupported, hosted LLMs in Cody for coding, and I feel like this could very well be a Modelfile-level thing with providers happily providing integrations, putting even more spotlight on Ollama while forcing LLM providers to be less fuzzy about their API integrations, given that the Modelfile spec is rigid enough.

Originally created by @19h on GitHub (May 14, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/4440 We've been coding against the Ollama API internally and eventually it hit me .. Ollama should be able to support third-party API providers, making it a de-facto gateway to LLMs. For example, it would easily blur the lines between an OpenAI's assistant / user and a Gemini model / user conversation; it could transparently speak Cohere Command R+ completion-like while eloquently talking to Claude, too. Might sound utterly off-topic, but think about it. I implemented a hard-coded model into Ollama for local use so I can use unsupported, hosted LLMs in Cody for coding, and I feel like this could very well be a Modelfile-level thing with providers happily providing integrations, putting even more spotlight on Ollama while forcing LLM providers to be less fuzzy about their API integrations, given that the Modelfile spec is rigid enough.
GiteaMirror added the feature requestapi labels 2026-04-22 06:46:46 -05:00
Author
Owner

@ProjectMoon commented on GitHub (May 15, 2024):

Isn't this something that LiteLLM can do?

<!-- gh-comment-id:2111737868 --> @ProjectMoon commented on GitHub (May 15, 2024): Isn't this something that LiteLLM can do?
Author
Owner

@oldgithubman commented on GitHub (May 18, 2024):

Isn't this something that LiteLLM can do?

It is, but combining efforts could be a good thing. This space needs more standardization, IMO

<!-- gh-comment-id:2119018882 --> @oldgithubman commented on GitHub (May 18, 2024): > Isn't this something that LiteLLM can do? It is, but combining efforts *could* be a good thing. This space needs more standardization, IMO
Author
Owner

@royjhan commented on GitHub (Jul 31, 2024):

OpenAI compatibility is the main focus on this front

<!-- gh-comment-id:2261064448 --> @royjhan commented on GitHub (Jul 31, 2024): OpenAI compatibility is the main focus on this front
Author
Owner

@19h commented on GitHub (Jul 31, 2024):

@royjhan completed where?

<!-- gh-comment-id:2261111700 --> @19h commented on GitHub (Jul 31, 2024): @royjhan completed where?
Author
Owner

@oldgithubman commented on GitHub (Jul 31, 2024):

@royjhan completed where?

I think some people don't know what "completed" means. I've shifted focus to mistral.rs. Seems like a better project. Still in early stages. Join us!

<!-- gh-comment-id:2261152923 --> @oldgithubman commented on GitHub (Jul 31, 2024): > @royjhan completed where? I think some people don't know what "completed" means. I've shifted focus to mistral.rs. Seems like a better project. Still in early stages. Join us!
Author
Owner

@royjhan commented on GitHub (Jul 31, 2024):

@19h Refer to https://github.com/ollama/ollama/blob/main/server/routes.go#L1082 for all major compatible endpoints. Doc updates are around the corner

<!-- gh-comment-id:2261495788 --> @royjhan commented on GitHub (Jul 31, 2024): @19h Refer to https://github.com/ollama/ollama/blob/main/server/routes.go#L1082 for all major compatible endpoints. Doc updates are around the corner
Author
Owner

@19h commented on GitHub (Aug 1, 2024):

Did you even read the issue, or do you just interact with the issues for the sake of it?

<!-- gh-comment-id:2261975448 --> @19h commented on GitHub (Aug 1, 2024): Did you even read the issue, or do you just interact with the issues for the sake of it?
Author
Owner

@royjhan commented on GitHub (Aug 1, 2024):

Apologies if I'm misunderstanding the issue! Reopened and will let someone else address it – thanks

<!-- gh-comment-id:2262025007 --> @royjhan commented on GitHub (Aug 1, 2024): Apologies if I'm misunderstanding the issue! Reopened and will let someone else address it – thanks
Author
Owner

@DennisDyallo commented on GitHub (Nov 6, 2024):

I mean using ollama in the terminal as an interface to start a session towards Claude or OpenAI would be great. That way I can do all my stuff locally without changing tools. Although, I am not yet well enough experienced with ollama. I only started using it a couple of days ago with OpenWebUI.

<!-- gh-comment-id:2460065332 --> @DennisDyallo commented on GitHub (Nov 6, 2024): I mean using ollama in the terminal as an interface to start a session towards Claude or OpenAI would be great. That way I can do all my stuff locally without changing tools. Although, I am not yet well enough experienced with ollama. I only started using it a couple of days ago with OpenWebUI.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#28532