fix migration
This commit is contained in:
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user