Repository navigation
Studio: do not show Run for embedding-only non-GGUF models in the Model Hub - #7245
Conversation
…el Hub A downloaded embedding-only repo (sentence-transformers, feature-extraction) reports canChat by safetensors format and classifies as supported, so the Model Hub showed a Run button that dead-ends at load. Keep embedding-only non-GGUF models out of the Run gate. GGUF is unaffected (llama.cpp resolves embed vs generate at load time), and these models stay trainable.
There was a problem hiding this comment.
Code Review
This pull request introduces a check to identify embedding-only, non-GGUF models to prevent them from being loaded in chat environments where they would fail due to the lack of a generative head. The reviewer suggests simplifying and future-proofing this check by verifying that all of the model's capabilities are either 'embedding' or 'multilingual', rather than maintaining an explicit list of non-generative capabilities.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| const isEmbeddingOnly = | ||
| !model.isGguf && | ||
| model.capabilities.some((c) => c.key === "embedding") && | ||
| !model.capabilities.some( | ||
| (c) => | ||
| c.key === "conversational" || | ||
| c.key === "tools" || | ||
| c.key === "reasoning" || | ||
| c.key === "code" || | ||
| c.key === "vision" || | ||
| c.key === "audio", | ||
| ); |
There was a problem hiding this comment.
This check can be simplified and made more future-proof. Instead of maintaining an explicit list of all generative capabilities (which would need to be updated whenever a new capability is added), we can define an embedding-only model as one where all of its capabilities are either embedding or multilingual.
This reduces the complexity and avoids potential bugs if new generative capabilities are introduced in the future.
const isEmbeddingOnly =
!model.isGguf &&
model.capabilities.some((c) => c.key === "embedding") &&
model.capabilities.every((c) => c.key === "embedding" || c.key === "multilingual");
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4cc1abdb0e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| model.capabilities.some((c) => c.key === "embedding") && | ||
| !model.capabilities.some( | ||
| (c) => | ||
| c.key === "conversational" || | ||
| c.key === "tools" || |
There was a problem hiding this comment.
Exempt text-generation models from the embedding-only gate
When a runnable hybrid model advertises an embedding tag (for example feature-extraction) but has pipelineTag: "text-generation" and no chat/code/etc. tags, detectCapabilities produces only embedding: its conversational detection does not recognize text-generation. This predicate then disables Run despite the model meeting the prior runtime/support checks. Treat a generative pipeline tag as a positive exception (or derive this from architecture metadata) so those hybrid repositories remain runnable.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Exempting every text-generation pipeline would re-enable Run for the causal-LM rerankers and embedders this gate is meant to catch (Qwen3-Reranker, e5-mistral, gte-Qwen are all text-generation). The embedding heuristic keys on embed/reranker/e5/gte/bge model ids, which no mainstream instruct chat model matches, so runnable chat models are not affected. Keeping the gate as is.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4cc1abdb0e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| c.key === "conversational" || | ||
| c.key === "tools" || | ||
| c.key === "reasoning" || | ||
| c.key === "code" || | ||
| c.key === "vision" || | ||
| c.key === "audio", |
There was a problem hiding this comment.
Keep code embedding models out of the Run gate
For embedding-only repositories whose name or tags also identify them as code models, this exception re-enables the dead-ending Run action. For example, jinaai/jina-embeddings-v2-base-code receives both embedding and code from detectCapabilities (the latter from the code suffix), so isEmbeddingOnly becomes false even though it has no generative head. The same issue applies to embedding models classified as reasoning, vision, or audio; use an actual generative pipeline/capability signal rather than these topical labels to exempt a model.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Confirmed. jina-embeddings-v2-base-code picks up the code label from its name suffix, so I now gate on the embedding pipeline tag, which is authoritative and keeps these code and vision embedding repos out of the Run action.
An embedding repo whose name or tags also imply code, vision, audio or reasoning (e.g. jina-embeddings-v2-base-code picks up code from its -code suffix) slipped the embedding-only Run gate and dead-ended on a chat load. Treat a feature-extraction or sentence-similarity pipeline tag as authoritative for the gate; the change only ever widens it.
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Before and after for hiding Run on embedding-only non-GGUF models in the Model Hub, using a real feature-extraction repo (no mocks). Before, an embedding-only safetensors model showed an enabled Run button that dead-ends when the loader tries to start a chat. After, it is treated as not runnable and Run is disabled; GGUF and the train gate are unaffected. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…el Hub (unslothai#7245) * Studio: do not show Run for embedding-only non-GGUF models in the Model Hub A downloaded embedding-only repo (sentence-transformers, feature-extraction) reports canChat by safetensors format and classifies as supported, so the Model Hub showed a Run button that dead-ends at load. Keep embedding-only non-GGUF models out of the Run gate. GGUF is unaffected (llama.cpp resolves embed vs generate at load time), and these models stay trainable. * Gate embedding-only models on the pipeline tag, not just capabilities An embedding repo whose name or tags also imply code, vision, audio or reasoning (e.g. jina-embeddings-v2-base-code picks up code from its -code suffix) slipped the embedding-only Run gate and dead-ended on a chat load. Treat a feature-extraction or sentence-similarity pipeline tag as authoritative for the gate; the change only ever widens it. * studio: tighten comments in the hub embedding run guard * Tighten comments in the hub embedding run guard --------- Co-authored-by: danielhanchen <[email protected]>

Problem
Follow-up to #7001. That change gated the non-GGUF Run button on host capability and format support, which is correct for generative models. But a downloaded embedding-only repo (for example a sentence-transformers or feature-extraction model) reports
canChatby safetensors format and classifies as supported, so the Model Hub still shows an enabled Run button that dead-ends when the loader tries to start a chat on a model with no generative head.Fix
Treat an embedding-only non-GGUF model (has an embedding capability and none of conversational, tools, reasoning, code, vision or audio) as not runnable, and keep it out of the Run gate. GGUF is unaffected, since llama.cpp resolves embed vs generate at load time. This only touches the Run affordance; the model stays trainable, so the shared train gate is untouched.
Verification
The gating predicate was checked against embedding-only, chat, hybrid, GGUF and CPU-only cases; the enabled-Run set now matches what actually loads, and the previously dead-ending embedding-only case is disabled. Frontend only, scoped to the Model Hub card.
Compatibility
Additive guard on the existing predicate; no change to GGUF, chat or hybrid models, and the train gate is unaffected.