fix migration

This commit is contained in:
2026-06-16 09:59:39 +03:00
parent 2f892bef19
commit c69186c13b
5 changed files with 50 additions and 23 deletions
+12
View File
@@ -9,12 +9,24 @@ DEPRECATED_VISION_MODELS: dict[str, str] = {
"google/gemini-2.0-flash-lite": "google/gemini-2.5-flash-lite",
}
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",
}
def resolve_vision_model(model: str) -> str:
stripped = model.strip()
return DEPRECATED_VISION_MODELS.get(stripped, stripped)
def resolve_extract_model(model: str) -> str:
stripped = model.strip()
return DEPRECATED_EXTRACT_MODELS.get(stripped, stripped)
class Settings(BaseSettings):
model_config = SettingsConfigDict(
env_file=(".env", "../.env"),