fix(oci): label Ollama API endpoint accurately

This commit is contained in:
Jonatan
2026-10-31 10:07:51 +01:00
parent 14e2718275
commit 139a4b4089
2 changed files with 37 additions and 0 deletions
+19
View File
@@ -1,4 +1,23 @@
{ {
"catalog_ui": {
"description": {
"en_US": "Ollama runs large language models locally through a command-line interface and an HTTP API. The Ollama server does not include an interactive Web UI; pair it with a frontend such as Open WebUI if you want browser-based chat.\n\nIt supports many models, including Llama, Mistral, Gemma, and Qwen, and provides an API for applications and integrations. Local models run on your own hardware; cloud models require an internet connection.\n\n**Key Features:**\n- **Local model execution**: Run supported models on your own hardware\n- **Model management**: Pull, run, and manage models with the CLI or API\n- **API integration**: Connect other applications to the Ollama server\n- **Privacy options**: Keep inference local when using local models\n\n**Learn More:**\n- [Ollama Official Website](https://ollama.com/)\n- [Ollama GitHub Repository](https://github.com/ollama/ollama)\n- [Model Library](https://ollama.com/library)\n"
},
"launch": {
"path": "/api/version"
}
},
"first_run": {
"endpoints": [
{
"label": "Ollama API (no Web UI)",
"scheme": "http",
"port": 11434,
"path": "/api/version",
"source": "ollama-http-api"
}
]
},
"proxmox": { "proxmox": {
"deployment_profile": { "deployment_profile": {
"variant": "hardware-selectable", "variant": "hardware-selectable",
+18
View File
@@ -56,6 +56,24 @@ class CatalogWebLinks(unittest.TestCase):
self.assertEqual((check["scheme"], check["port"]), ("http", 9696)) self.assertEqual((check["scheme"], check["port"]), ("http", 9696))
self.assertNotIn("accept_non_http", check) self.assertNotIn("accept_non_http", check)
def test_ollama_links_to_its_api_instead_of_claiming_a_web_ui(self):
template = self.catalog.compose("ollama")
launch = template["catalog_ui"]["launch"]
self.assertEqual(launch, {"scheme": "http", "port": 11434, "path": "/api/version"})
endpoint = template["first_run"]["endpoints"][0]
self.assertEqual(endpoint["label"], "Ollama API (no Web UI)")
self.assertEqual({key: endpoint[key] for key in launch}, launch)
self.assertEqual(endpoint["source"], "ollama-http-api")
self.assertNotIn("Web interface", template["catalog_ui"]["description"]["en_US"])
self.assertIn("does not include an interactive Web UI",
template["catalog_ui"]["description"]["en_US"])
check = transaction.effective_healthcheck(template)
self.assertEqual((check["scheme"], check["port"], check["path"]),
("http", 11434, "/api/version"))
notes = oci_description.render(template, "", "ollama", "192.0.2.10")
self.assertIn('href="http://192.0.2.10:11434/api/version"', notes)
self.assertIn("Ollama API (no Web UI)", notes)
@patch("proxmenux_oci.installer.host.gpus", return_value={"intel": [], "amd": [], "nvidia": False}) @patch("proxmenux_oci.installer.host.gpus", return_value={"intel": [], "amd": [], "nvidia": False})
@patch("proxmenux_oci.i18n.language", return_value="en") @patch("proxmenux_oci.i18n.language", return_value="en")
@patch("proxmenux_oci.installer.host.storages", side_effect=storages) @patch("proxmenux_oci.installer.host.storages", side_effect=storages)