File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -103,4 +103,16 @@ describe("areOllamaModelsEquivalent", () => {
103103 assert . strictEqual ( areOllamaModelsEquivalent ( "hf.co/bartowski/llama3.2" , "hf.co/bartowski/llama3.2:latest" ) , true )
104104 assert . strictEqual ( areOllamaModelsEquivalent ( "hf.co/bartowski/llama3.2:gguf" , "hf.co/bartowski/llama3.2:latest" ) , false )
105105 } )
106+
107+ test ( "handles case sensitivity correctly" , ( ) => {
108+ // Model names should be case-sensitive as in Docker registries
109+ assert . strictEqual ( areOllamaModelsEquivalent ( "Llama3.2" , "llama3.2:latest" ) , false )
110+ assert . strictEqual ( areOllamaModelsEquivalent ( "LLAMA3.2" , "llama3.2" ) , false )
111+ } )
112+
113+ test ( "handles registry-like names correctly" , ( ) => {
114+ // Models with registry:port format should not get :latest added
115+ assert . strictEqual ( normalizeOllamaModelName ( "registry:5000/model" ) , "registry:5000/model" )
116+ assert . strictEqual ( areOllamaModelsEquivalent ( "registry:5000/model" , "registry:5000/model:latest" ) , false )
117+ } )
106118} )
You can’t perform that action at this time.
0 commit comments