Skip to content

Commit a345bc8

Browse files
committed
:latest tag should not be assumed for non-OCI artefacts
I see people showing things like: file://srv/llm/modles/unsloth/Qwen3-235B-A22B-GGUF/UD_Q2_K_XL/Qwen3-235B-A22B-UD-Q2_K_XL-00001-of-00002.gguf:latest 1 month ago 46.42 GB file://srv/llm/modles/unsloth/Qwen3-235B-A22B-GGUF/UD_Q2_K_XL/Qwen3-235B-A22B-UD-Q2_K_XL-00002-of-00002.gguf:latest 1 month ago 35.55 GB file://srv/llm/modles/unsloth/Qwen3-235B-A22B-GGUF/Q8_0/Qwen3-235B-A22B-Q8_0-00001-of-00006.gguf:latest 1 week ago 46.44 GB file://srv/llm/modles/unsloth/Qwen3-235B-A22B-GGUF/Q8_0/Qwen3-235B-A22B-Q8_0-00002-of-00006.gguf:latest 1 week ago 46.0 GB file://srv/llm/modles/unsloth/Qwen3-235B-A22B-GGUF/Q8_0/Qwen3-235B-A22B-Q8_0-00003-of-00006.gguf:latest 1 week ago 45.93 GB file://srv/llm/modles/unsloth/Qwen3-235B-A22B-GGUF/Q8_0/Qwen3-235B-A22B-Q8_0-00004-of-00006.gguf:latest 1 week ago 46.0 GB file://srv/llm/modles/unsloth/Qwen3-235B-A22B-GGUF/Q8_0/Qwen3-235B-A22B-Q8_0-00005-of-00006.gguf:latest 1 week ago 46.0 GB file://srv/llm/modles/unsloth/Qwen3-235B-A22B-GGUF/Q8_0/Qwen3-235B-A22B-Q8_0-00006-of-00006.gguf:latest 1 week ago 2.39 GB Signed-off-by: Eric Curtin <[email protected]>
1 parent 67eb942 commit a345bc8

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

ramalama/cli.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,8 @@ def _list_models_from_store(args):
483483

484484
if model.startswith("huggingface://"):
485485
model = model.replace("huggingface://", "hf://", 1)
486+
487+
if not model.startswith("ollama://") and not model.startswith("oci://"):
486488
model = model.removesuffix(":latest")
487489

488490
size_sum = 0

test/system/050-pull.bats

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ load setup_suite
141141
run_ramalama pull $file_url
142142
run_ramalama list
143143
# remove the additional slash character
144-
expected_url=$(sed "s/file\:\//file\:/" <<< $file_url):latest
144+
expected_url=$(sed "s/file\:\//file\:/" <<< $file_url)
145145
is "$output" ".*$expected_url" "URL exists"
146146
run_ramalama rm $file_url
147147
run_ramalama list
@@ -163,7 +163,7 @@ load setup_suite
163163
touch $model
164164
url=file://${model}
165165
# remove the additional slash character
166-
expected_url=$(sed "s/file\:\//file\:/" <<< $url):latest
166+
expected_url=$(sed "s/file\:\//file\:/" <<< $url)
167167

168168
run_ramalama pull $url
169169
run_ramalama list

0 commit comments

Comments
 (0)