From a20fc70d01948e03955df7e2e137be12b3c2ee9d Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 15:52:22 +0000 Subject: [PATCH 1/2] Changes Co-authored-by: domfelipe <53182096+domfelipe@users.noreply.github.com> --- supabase/functions/provision-agent/index.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/supabase/functions/provision-agent/index.ts b/supabase/functions/provision-agent/index.ts index 80e2ddd..c4306f8 100644 --- a/supabase/functions/provision-agent/index.ts +++ b/supabase/functions/provision-agent/index.ts @@ -230,15 +230,10 @@ Deno.serve(async (req) => { 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 modelFinal = isPro - ? "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"; + const modelFinal = isPro ? "ollama-cloud/gemma4:31b-cloud" : "ollama-cloud/gemma4:31b-cloud"; // 7) Criar serviço no Railway const serviceName = `mika-${agent.uuid_tenant.replace(/-/g, "").slice(0, 8)}`; From 9eb3211ed9d39b203afa7d7a3a334bf5ee41b500 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 15:52:49 +0000 Subject: [PATCH 2/2] Changes Co-authored-by: domfelipe <53182096+domfelipe@users.noreply.github.com> --- supabase/functions/provision-agent/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/supabase/functions/provision-agent/index.ts b/supabase/functions/provision-agent/index.ts index c4306f8..6fb762c 100644 --- a/supabase/functions/provision-agent/index.ts +++ b/supabase/functions/provision-agent/index.ts @@ -471,10 +471,10 @@ async function handleUpdateExistingService( } // Upsert das vars principais (não mexemos em token Telegram aqui — preservado) + // NÃO injetar HERMES_MODEL: a imagem custom já tem config.yaml com ollama-cloud/gemma4:31b-cloud. + // Sobrescrever via env var quebra o bot (model: "" / 404 not found). const variables: Record = { HERMES_SOUL_OVERRIDE: soulContent, - HERMES_MODEL: model, - HERMES_FALLBACK_MODEL: "openrouter/google/gemma-4-31b-it", HERMES_STT_PROVIDER: sttProvider, HERMES_TTS_PROVIDER: ttsProvider, };