Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

fixing sesame model

Manan17905f989521a8
diff --git a/studio/backend/routes/models.py b/studio/backend/routes/models.py
index d3a93a5d750..1590947fdd0 100644
--- a/studio/backend/routes/models.py
+++ b/studio/backend/routes/models.py
@@ -268,11 +268,12 @@ async def list_models(
@router.get("/config/{model_name:path}")
async def get_model_config(
model_name: str,
+ hf_token: Optional[str] = Query(None),
current_subject: str = Depends(get_current_subject),
):
"""
Get configuration for a specific model.
-
+
This endpoint wraps the backend load_model_defaults function.
"""
try:
@@ -281,9 +282,9 @@ async def get_model_config(
# Load model defaults from backend
config_dict = load_model_defaults(model_name)
- # Detect model capabilities
+ # Detect model capabilities (pass HF token for gated models)
is_vision = is_vision_model(model_name)
- audio_type = detect_audio_type(model_name)
+ audio_type = detect_audio_type(model_name, hf_token=hf_token)
# Check if it's a LoRA adapter
is_lora = False
diff --git a/studio/frontend/src/features/training/api/models-api.ts b/studio/frontend/src/features/training/api/models-api.ts
index 0536eddf4c3..d2c4f066614 100644
--- a/studio/frontend/src/features/training/api/models-api.ts
+++ b/studio/frontend/src/features/training/api/models-api.ts
@@ -94,9 +94,11 @@ export async function checkVisionModel(modelName: string): Promise<boolean> {
export async function getModelConfig(
modelName: string,
signal?: AbortSignal,
+ hfToken?: string,
): Promise<ModelConfigResponse> {
const encoded = encodeURIComponent(modelName);
- const response = await authFetch(`/api/models/config/${encoded}`, { signal });
+ const params = hfToken ? `?hf_token=${encodeURIComponent(hfToken)}` : "";
+ const response = await authFetch(`/api/models/config/${encoded}${params}`, { signal });
if (!response.ok) {
throw new Error(`Failed to fetch model config (${response.status})`);
}
diff --git a/studio/frontend/src/features/training/stores/training-config-store.ts b/studio/frontend/src/features/training/stores/training-config-store.ts
index a88a110ea51..a71987633a3 100644
--- a/studio/frontend/src/features/training/stores/training-config-store.ts
+++ b/studio/frontend/src/features/training/stores/training-config-store.ts
@@ -110,7 +110,7 @@ export const useTrainingConfigStore = create<TrainingConfigStore>()(
modelDefaultsError: null,
});
- void getModelConfig(modelName, controller.signal)
+ void getModelConfig(modelName, controller.signal, get().hfToken || undefined)
.then((modelDetails) => {
if (controller.signal.aborted) return;
if (get().selectedModel !== modelName) return;