add debug logging to getSelectedModel to trace model selection issue
This commit is contained in:
parent
98592efb8d
commit
525c4c315f
1 changed files with 14 additions and 3 deletions
|
|
@ -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";
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue