Why ``model`` can't be a sentence-transformers model, or None if it's fine. sentence-transformers loads HuggingFace model ids. An ``ollama/`` prefix is a LiteLLM/Ollama route that ST tries (and fails) to resolve as a HuggingFace repo — the user wants the litellm provider instead (issue
(model: str)
| 324 | |
| 325 | |
| 326 | def _st_model_rejection_reason(model: str) -> str | None: |
| 327 | """Why ``model`` can't be a sentence-transformers model, or None if it's fine. |
| 328 | |
| 329 | sentence-transformers loads HuggingFace model ids. An ``ollama/`` prefix is a |
| 330 | LiteLLM/Ollama route that ST tries (and fails) to resolve as a HuggingFace |
| 331 | repo — the user wants the litellm provider instead (issue #181). Real |
| 332 | HuggingFace ids that contain an ``org/`` slash (``Snowflake/...``, |
| 333 | ``openai/...``) are left alone. |
| 334 | """ |
| 335 | if model.strip().lower().startswith("ollama/"): |
| 336 | return ( |
| 337 | "ollama/… models run via litellm, not sentence-transformers — " |
| 338 | "go back and pick the litellm provider instead." |
| 339 | ) |
| 340 | return None |
| 341 | |
| 342 | |
| 343 | def _resolve_embedding_choice( |
no outgoing calls
no test coverage detected