fix mapping
This commit is contained in:
@@ -10,10 +10,11 @@ DEPRECATED_VISION_MODELS: dict[str, str] = {
|
||||
}
|
||||
|
||||
DEPRECATED_EXTRACT_MODELS: dict[str, str] = {
|
||||
"google/gemini-2.0-flash-001": "google/gemini-2.5-flash-lite",
|
||||
"google/gemini-2.0-flash": "google/gemini-2.5-flash-lite",
|
||||
"google/gemini-2.0-flash-lite-001": "google/gemini-2.5-flash-lite",
|
||||
"google/gemini-2.0-flash-lite": "google/gemini-2.5-flash-lite",
|
||||
# Пустая строка → fallback на OPENROUTER_MODEL в SettingsService.get_effective
|
||||
"google/gemini-2.0-flash-001": "",
|
||||
"google/gemini-2.0-flash": "",
|
||||
"google/gemini-2.0-flash-lite-001": "",
|
||||
"google/gemini-2.0-flash-lite": "",
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -230,8 +230,13 @@ class LLMClient:
|
||||
visible_reply: bool = False,
|
||||
) -> dict[str, Any]:
|
||||
use_tools = bool(tools) and self.tools_enabled and not for_extraction
|
||||
chosen_model = model
|
||||
if chosen_model:
|
||||
from app.config import resolve_extract_model
|
||||
|
||||
chosen_model = resolve_extract_model(chosen_model) or None
|
||||
kwargs: dict[str, Any] = {
|
||||
"model": model or self.model,
|
||||
"model": chosen_model or self.model,
|
||||
"messages": messages,
|
||||
"temperature": temperature,
|
||||
}
|
||||
|
||||
@@ -70,7 +70,8 @@ class SettingsService:
|
||||
if key == "openrouter_vision_model":
|
||||
return resolve_vision_model(raw.strip())
|
||||
if key == "memory_extract_model":
|
||||
return resolve_extract_model(raw.strip())
|
||||
resolved = resolve_extract_model(raw.strip())
|
||||
return resolved if resolved else self._default_for(key)
|
||||
return raw
|
||||
|
||||
def snapshot(self) -> dict[str, Any]:
|
||||
|
||||
Reference in New Issue
Block a user