[GH-ISSUE #3419] Ollama local discovery #27867

Closed
opened 2026-04-22 05:30:24 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @rakyll on GitHub (Mar 30, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/3419

What are you trying to do?

It's a common use case for LLM tool builders to wish they can rely on a local model rather than relying on a hosted one to save costs. Currently, there is no official way to discover whether a local ollama server is running.

How should we solve this?

Provide a mechanism so it becomes possible to programmatically discover the ollama server endpoint. It could be a subcommand in the ollama CLI:

$ ollama info
{ "status": "running", "api_endpoint": "...." }

What is the impact of not solving this?

This would open up the possibility of being able to fall back to a local model if ollama is available and running. It would open up wider adoption of ollama because cost and latency are both critical concerns for LLM applications.

Anything else?

No response

Originally created by @rakyll on GitHub (Mar 30, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/3419 ### What are you trying to do? It's a common use case for LLM tool builders to wish they can rely on a local model rather than relying on a hosted one to save costs. Currently, there is no official way to discover whether a local ollama server is running. ### How should we solve this? Provide a mechanism so it becomes possible to programmatically discover the ollama server endpoint. It could be a subcommand in the ollama CLI: ``` $ ollama info { "status": "running", "api_endpoint": "...." } ``` ### What is the impact of not solving this? This would open up the possibility of being able to fall back to a local model if ollama is available and running. It would open up wider adoption of ollama because cost and latency are both critical concerns for LLM applications. ### Anything else? _No response_
Author
Owner

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

Hey @rakyll , you can do this w/ ollama -v. If the server and client's versions match it will say something like ollama version 0.1.33. If the server isn't running it will tell you that it can't contact the server.

Alternatively you can just try to curl the server on the 11434 port:

% curl localhost:11434
Ollama is running

LMK if that makes sense.

<!-- gh-comment-id:2111384253 --> @pdevine commented on GitHub (May 15, 2024): Hey @rakyll , you can do this w/ `ollama -v`. If the server and client's versions match it will say something like `ollama version 0.1.33`. If the server isn't running it will tell you that it can't contact the server. Alternatively you can just try to curl the server on the `11434` port: ``` % curl localhost:11434 Ollama is running ``` LMK if that makes sense.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#27867