feat: add DeepSeek and Minimax (m2.7) translation providers
New providers: - DeepSeek: direct API with deepseek-chat model, very cost-effective - Minimax: MiniMax-M1 model via OpenAI-compatible API, supports m2.7 Changes: - Full provider implementations with retry, health check, batch support - Provider config with env vars (DEEPSEEK_*, MINIMAX_*) - Auto-registration in provider registry - Updated fallback chain to include new providers - Updated setup-env.sh wizard with options 6 (deepseek) and 7 (minimax) - Updated manage-keys.sh with new menu entries and provider switching - Updated docker-compose.yml with new env vars Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -101,6 +101,8 @@ while true; do
|
||||
show_key_status "OpenAI" "OPENAI_API_KEY"
|
||||
show_key_status "DeepL" "DEEPL_API_KEY"
|
||||
show_key_status "OpenRouter" "OPENROUTER_API_KEY"
|
||||
show_key_status "DeepSeek" "DEEPSEEK_API_KEY"
|
||||
show_key_status "Minimax" "MINIMAX_API_KEY"
|
||||
show_key_status "Google" "GOOGLE_API_KEY"
|
||||
echo ""
|
||||
|
||||
@@ -121,7 +123,9 @@ while true; do
|
||||
echo " 4) Configurer Stripe (toutes les cles)"
|
||||
echo " 5) Changer le mot de passe admin"
|
||||
echo " 6) Changer le service de traduction"
|
||||
echo " 7) Tout afficher (attention: secrets visibles)"
|
||||
echo " 7) Configurer DeepSeek"
|
||||
echo " 8) Configurer Minimax (m2.7)"
|
||||
echo " 9) Tout afficher (attention: secrets visibles)"
|
||||
echo " 0) Quitter"
|
||||
echo ""
|
||||
echo -ne "${YELLOW}Choix:${NC} "
|
||||
@@ -192,10 +196,12 @@ while true; do
|
||||
6)
|
||||
echo -e "\n${BOLD}--- Service de traduction ---${NC}"
|
||||
echo " Actuel: $(get_env TRANSLATION_SERVICE)"
|
||||
echo " 1) ollama (local, gratuit)"
|
||||
echo " 2) deepl (haute qualite)"
|
||||
echo " 3) openai (GPT)"
|
||||
echo " 1) ollama (local, gratuit)"
|
||||
echo " 2) deepl (haute qualite)"
|
||||
echo " 3) openai (GPT)"
|
||||
echo " 4) openrouter (multi-modeles)"
|
||||
echo " 5) deepseek (bon rapport qualite/prix)"
|
||||
echo " 6) minimax (MiniMax-M1 / m2.7)"
|
||||
echo ""
|
||||
echo -ne " Choix: "
|
||||
read -r svc
|
||||
@@ -204,12 +210,34 @@ while true; do
|
||||
2) set_env "TRANSLATION_SERVICE" "deepl" ;;
|
||||
3) set_env "TRANSLATION_SERVICE" "openai" ;;
|
||||
4) set_env "TRANSLATION_SERVICE" "openrouter" ;;
|
||||
5) set_env "TRANSLATION_SERVICE" "deepseek" ;;
|
||||
6) set_env "TRANSLATION_SERVICE" "minimax" ;;
|
||||
*) echo -e " ${RED}Choix invalide${NC}" ;;
|
||||
esac
|
||||
echo -e " ${GREEN}Service mis a jour${NC}"
|
||||
echo -e " ${YELLOW}Redemarre: docker compose restart backend${NC}"
|
||||
;;
|
||||
7)
|
||||
echo -e "\n${BOLD}--- DeepSeek ---${NC}"
|
||||
echo " Ou: https://platform.deepseek.com/api_keys"
|
||||
echo " Modele par defaut: deepseek-chat"
|
||||
ask_key "DeepSeek" "DEEPSEEK_API_KEY"
|
||||
if [ -n "$(get_env DEEPSEEK_API_KEY)" ]; then
|
||||
set_env "DEEPSEEK_ENABLED" "true"
|
||||
echo -e " ${GREEN}Provider DeepSeek active${NC}"
|
||||
fi
|
||||
;;
|
||||
8)
|
||||
echo -e "\n${BOLD}--- Minimax (m2.7 / MiniMax-M1) ---${NC}"
|
||||
echo " Ou: https://platform.minimaxi.com/"
|
||||
echo " Modele par defaut: MiniMax-M1"
|
||||
ask_key "Minimax" "MINIMAX_API_KEY"
|
||||
if [ -n "$(get_env MINIMAX_API_KEY)" ]; then
|
||||
set_env "MINIMAX_ENABLED" "true"
|
||||
echo -e " ${GREEN}Provider Minimax active${NC}"
|
||||
fi
|
||||
;;
|
||||
9)
|
||||
echo ""
|
||||
echo -e "${RED}${BOLD}ATTENTION: Secrets visibles!${NC}"
|
||||
echo -ne "${YELLOW}Taper 'oui' pour continuer:${NC} "
|
||||
|
||||
Reference in New Issue
Block a user