Skip to content

Commit 94f285b

Browse files
Ensure unique_id tags on push-all and bump 0.5.6
1 parent da10e93 commit 94f285b

File tree

5 files changed

+14
-4
lines changed

5 files changed

+14
-4
lines changed

backend/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Backend sync worker service."""
22

3-
__version__ = "0.5.5"
3+
__version__ = "0.5.6"

frontend/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Frontend API and UI service."""
22

3-
__version__ = "0.5.5"
3+
__version__ = "0.5.6"

litellm_updater/web.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,14 @@ async def api_get_providers(session: AsyncSession = Depends(get_session)):
10801080
"""Get all providers from database."""
10811081
from .crud import get_all_providers
10821082

1083+
def _ensure_unique_tag(provider_name: str, model_id: str, tags: list[str]) -> list[str]:
1084+
"""Make sure unique_id tag is present."""
1085+
normalized = [t.lower() for t in tags]
1086+
uid = f"unique_id:{provider_name}/{model_id}".lower()
1087+
if uid not in normalized:
1088+
tags.append(uid)
1089+
return tags
1090+
10831091
providers = await get_all_providers(session)
10841092
return [
10851093
{
@@ -1815,6 +1823,7 @@ async def api_push_all_models_to_litellm(
18151823

18161824
# Use compat model's tags
18171825
combined_tags = model.all_tags or ["lupdater", f"provider:{provider.name}", "type:compat"]
1826+
combined_tags = _ensure_unique_tag(provider.name, model.model_id, combined_tags)
18181827
litellm_params["tags"] = combined_tags
18191828

18201829
# Use mapped model's metadata (effective_params)
@@ -1888,6 +1897,7 @@ async def api_push_all_models_to_litellm(
18881897
provider_tags=provider.tags_list,
18891898
mode=ollama_mode,
18901899
)
1900+
combined_tags = _ensure_unique_tag(provider.name, model.model_id, combined_tags)
18911901

18921902
litellm_params["tags"] = combined_tags
18931903

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "litellm-updater"
3-
version = "0.5.5"
3+
version = "0.5.6"
44
description = "Synchronize models from Ollama or OpenAI-compatible endpoints into LiteLLM"
55
authors = [
66
{name = "LiteLLM Updater Authors", email = "dev@example.com"}

shared/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Shared code between backend and frontend services."""
22

3-
__version__ = "0.5.5"
3+
__version__ = "0.5.6"

0 commit comments

Comments
 (0)