Co-authored-by: domfelipe <53182096+domfelipe@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot] 2026-04-29 15:52:22 +00:00
parent 9ca39e1578
commit a20fc70d01

View file

@ -230,15 +230,10 @@ Deno.serve(async (req) => {
TELEGRAM_HOME_CHANNEL: chatIdStr, TELEGRAM_HOME_CHANNEL: chatIdStr,
}; };
// Manter campos derivados para persistir em model_config // Modelo é definido pelo config.yaml embutido na imagem custom (ollama-cloud + gemma4:31b-cloud).
// NÃO injetar HERMES_MODEL como env var — sobrescreve o config.yaml e quebra o bot.
const agentNameFinal = agentName; const agentNameFinal = agentName;
const modelFinal = isPro const modelFinal = isPro ? "ollama-cloud/gemma4:31b-cloud" : "ollama-cloud/gemma4:31b-cloud";
? "openrouter/google/gemma-4-31b-it"
: "openrouter/google/gemma-4-27b-a4b-it";
// Injetar modelo + fallback no container (faltava aqui — bots novos nasciam com model: "")
envVars.HERMES_MODEL = modelFinal;
envVars.HERMES_FALLBACK_MODEL = "openrouter/google/gemma-4-31b-it";
// 7) Criar serviço no Railway // 7) Criar serviço no Railway
const serviceName = `mika-${agent.uuid_tenant.replace(/-/g, "").slice(0, 8)}`; const serviceName = `mika-${agent.uuid_tenant.replace(/-/g, "").slice(0, 8)}`;