diff --git a/src/models.js b/src/models.js index 0dae101..4d09818 100644 --- a/src/models.js +++ b/src/models.js @@ -217,9 +217,13 @@ export function getSelectedModel() { if (modalDropdown?.value) { // Extract just the model name, not the unique ID const selectedId = modalDropdown.value; + console.log("🔍 DEBUG: Modal dropdown value:", selectedId); if (modelRegistry[selectedId]) { - return selectedId.split("-").slice(1).join("-"); // Remove endpoint prefix + const modelName = selectedId.split("-").slice(1).join("-"); // Remove endpoint prefix + console.log("🔍 DEBUG: Extracted model name:", modelName); + return modelName; } + console.log("🔍 DEBUG: Model not in registry, returning raw value:", modalDropdown.value); return modalDropdown.value; } @@ -228,19 +232,26 @@ export function getSelectedModel() { if (dropdown?.value) { // Extract just the model name, not the unique ID const selectedId = dropdown.value; + console.log("🔍 DEBUG: Main dropdown value:", selectedId); if (modelRegistry[selectedId]) { - return selectedId.split("-").slice(1).join("-"); // Remove endpoint prefix + const modelName = selectedId.split("-").slice(1).join("-"); // Remove endpoint prefix + console.log("🔍 DEBUG: Extracted model name:", modelName); + return modelName; } + console.log("🔍 DEBUG: Model not in registry, returning raw value:", dropdown.value); return dropdown.value; } // Return default model if nothing selected const defaultModel = Object.keys(modelRegistry)[0]; if (defaultModel) { - return defaultModel.split("-").slice(1).join("-"); // Remove endpoint prefix + const modelName = defaultModel.split("-").slice(1).join("-"); // Remove endpoint prefix + console.log("🔍 DEBUG: Using first model from registry:", modelName); + return modelName; } // Fallback to hardcoded model + console.log("🔍 DEBUG: Using hardcoded fallback model"); return "adamo1139/Hermes-3-Llama-3.1-8B-FP8-Dynamic"; }