feat: update to June 2026 models (Claude Sonnet 4.6, Gemini 3.5 Flash), add glossary button, and implement cost factor quota & vision fallback
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m4s
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m4s
This commit is contained in:
@@ -105,41 +105,58 @@ async def get_available_providers():
|
||||
"tier": "pro",
|
||||
})
|
||||
|
||||
# AI Essentielle (OpenRouter — cheap model)
|
||||
# AI Essentielle (OpenRouter — cheap model / Eco)
|
||||
if _is_enabled("openrouter", key_var="OPENROUTER_API_KEY"):
|
||||
or_cfg = getattr(settings, "openrouter", None)
|
||||
model = _resolve_model(
|
||||
or_cfg.model if or_cfg else None,
|
||||
"OPENROUTER_MODEL",
|
||||
"deepseek/deepseek-v3.2",
|
||||
"google/gemini-3.5-flash",
|
||||
)
|
||||
available.append({
|
||||
"id": "openrouter",
|
||||
"label": "Traduction IA Essentielle",
|
||||
"description": "IA rapide et économique — idéale pour documents techniques",
|
||||
"label": "Traduction IA Éco",
|
||||
"description": "IA rapide, économique et complète — supporte les images",
|
||||
"mode": "llm",
|
||||
"tier": "pro",
|
||||
"model": model,
|
||||
})
|
||||
|
||||
# AI Standard (DeepSeek via OpenRouter or direct DeepSeek API)
|
||||
if _is_enabled("openrouter", key_var="OPENROUTER_API_KEY") or _is_enabled("deepseek", key_var="DEEPSEEK_API_KEY"):
|
||||
ds_cfg = getattr(settings, "deepseek", None)
|
||||
model = _resolve_model(
|
||||
ds_cfg.model if ds_cfg else None,
|
||||
"DEEPSEEK_MODEL",
|
||||
"deepseek/deepseek-chat",
|
||||
)
|
||||
available.append({
|
||||
"id": "deepseek",
|
||||
"label": "Traduction IA Standard",
|
||||
"description": "IA ultra-précise pour le texte (ne traduit pas les images)",
|
||||
"mode": "llm",
|
||||
"tier": "pro",
|
||||
"model": model,
|
||||
})
|
||||
|
||||
# AI Premium (OpenRouter — premium model)
|
||||
if _is_enabled("openrouter_premium", key_var="OPENROUTER_API_KEY"):
|
||||
if _is_enabled("openrouter_premium", key_var="OPENROUTER_API_KEY") or _is_enabled("openrouter", key_var="OPENROUTER_API_KEY"):
|
||||
orp_cfg = getattr(settings, "openrouter_premium", None)
|
||||
model = _resolve_model(
|
||||
orp_cfg.model if orp_cfg else None,
|
||||
"OPENROUTER_PREMIUM_MODEL",
|
||||
"anthropic/claude-3.5-haiku",
|
||||
"anthropic/claude-sonnet-4.6",
|
||||
)
|
||||
available.append({
|
||||
"id": "openrouter_premium",
|
||||
"label": "Traduction IA Premium",
|
||||
"description": "IA haute précision (GPT-4, Claude) — meilleure qualité littéraire",
|
||||
"description": "IA haut de gamme — excellente qualité littéraire et multimodal",
|
||||
"mode": "llm",
|
||||
"tier": "business",
|
||||
"model": model,
|
||||
})
|
||||
|
||||
# OpenAI direct — if configured
|
||||
# OpenAI direct — if configured with direct API key
|
||||
if _is_enabled("openai", key_var="OPENAI_API_KEY"):
|
||||
oai_cfg = getattr(settings, "openai", None)
|
||||
model = _resolve_model(
|
||||
@@ -156,24 +173,7 @@ async def get_available_providers():
|
||||
"model": model,
|
||||
})
|
||||
|
||||
# DeepSeek direct — if configured
|
||||
if _is_enabled("deepseek", key_var="DEEPSEEK_API_KEY"):
|
||||
ds_cfg = getattr(settings, "deepseek", None)
|
||||
model = _resolve_model(
|
||||
ds_cfg.model if ds_cfg else None,
|
||||
"DEEPSEEK_MODEL",
|
||||
"deepseek-chat",
|
||||
)
|
||||
available.append({
|
||||
"id": "deepseek",
|
||||
"label": "Traduction IA Express",
|
||||
"description": "Traduction IA rapide et optimisée",
|
||||
"mode": "llm",
|
||||
"tier": "pro",
|
||||
"model": model,
|
||||
})
|
||||
|
||||
# MiniMax direct — if configured
|
||||
# MiniMax direct — if configured with direct API key
|
||||
if _is_enabled("minimax", key_var="MINIMAX_API_KEY"):
|
||||
mm_cfg = getattr(settings, "minimax", None)
|
||||
model = _resolve_model(
|
||||
@@ -190,7 +190,7 @@ async def get_available_providers():
|
||||
"model": model,
|
||||
})
|
||||
|
||||
# z.AI / xAI Grok — if configured
|
||||
# z.AI / xAI Grok — if configured with direct API key
|
||||
if _is_enabled("zai", key_var="ZAI_API_KEY"):
|
||||
zai_cfg = getattr(settings, "zai", None)
|
||||
model = _resolve_model(
|
||||
|
||||
Reference in New Issue
Block a user