Skip to content

Commit ff163fc

Browse files
committed
fix: handle unknown embedding models in zoo-embedding
Use the existing Other(String) fallback variant instead of returning InvalidModelArchitecture error for unknown model names. This prevents the node from crashing when the desktop app passes new embedding models.
1 parent bd001ab commit ff163fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

zoo-libs/zoo-embedding/src/model_type.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ impl OllamaTextEmbeddingsInference {
6363
Self::ALL_MINI_LML6V2 => Ok(Self::AllMiniLML6v2),
6464
Self::SNOWFLAKE_ARCTIC_EMBED_M => Ok(Self::SnowflakeArcticEmbedM),
6565
Self::JINA_EMBEDDINGS_V2_BASE_ES => Ok(Self::JinaEmbeddingsV2BaseEs),
66-
_ => Err(ZooEmbeddingError::InvalidModelArchitecture),
66+
_ => Ok(Self::Other(s.to_string())),
6767
}
6868
}
6969

0 commit comments

Comments
 (0)