diff --git a/apps/mana/apps/web/src/routes/api/v1/voice/parse-habit/+server.ts b/apps/mana/apps/web/src/routes/api/v1/voice/parse-habit/+server.ts index ca3670673..753c2e9b7 100644 --- a/apps/mana/apps/web/src/routes/api/v1/voice/parse-habit/+server.ts +++ b/apps/mana/apps/web/src/routes/api/v1/voice/parse-habit/+server.ts @@ -112,7 +112,9 @@ export const POST: RequestHandler = async ({ request }) => { const language = body.language ?? 'de'; if (!transcript || habits.length === 0) return json(fallback()); - const llmUrl = env.MANA_LLM_URL || env.PUBLIC_MANA_LLM_URL || 'http://localhost:3025'; + // $env/dynamic/private excludes PUBLIC_-prefixed vars; compose must + // set MANA_LLM_URL (no prefix) for this to reach mana-llm in prod. + const llmUrl = env.MANA_LLM_URL || 'http://localhost:3025'; const apiKey = env.MANA_LLM_API_KEY; let response: Response; diff --git a/apps/mana/apps/web/src/routes/api/v1/voice/parse-task/+server.ts b/apps/mana/apps/web/src/routes/api/v1/voice/parse-task/+server.ts index c47878bf6..4c765c7c2 100644 --- a/apps/mana/apps/web/src/routes/api/v1/voice/parse-task/+server.ts +++ b/apps/mana/apps/web/src/routes/api/v1/voice/parse-task/+server.ts @@ -87,7 +87,10 @@ export const POST: RequestHandler = async ({ request }) => { const language = body.language ?? 'de'; if (!transcript) return json(fallback('')); - const llmUrl = env.MANA_LLM_URL || env.PUBLIC_MANA_LLM_URL || 'http://localhost:3025'; + // $env/dynamic/private explicitly excludes vars with the PUBLIC_ + // prefix, so the compose file MUST set MANA_LLM_URL (no prefix) + // alongside PUBLIC_MANA_LLM_URL for this to reach mana-llm in prod. + const llmUrl = env.MANA_LLM_URL || 'http://localhost:3025'; const apiKey = env.MANA_LLM_API_KEY; let response: Response; diff --git a/docker-compose.macmini.yml b/docker-compose.macmini.yml index 874cea160..2d32c388b 100644 --- a/docker-compose.macmini.yml +++ b/docker-compose.macmini.yml @@ -766,11 +766,20 @@ services: # Analytics & Error Tracking PUBLIC_UMAMI_WEBSITE_ID: 32777167-e026-4618-933a-3429120b479b PUBLIC_GLITCHTIP_DSN: ${GLITCHTIP_DSN_MANA_WEB:-} - # Speech-to-Text proxy: SvelteKit /api/v1/memoro/transcribe and - # /api/v1/dreams/transcribe forward to mana-stt via Cloudflare Tunnel. - # The browser never sees the API key — it stays server-side. + # Speech-to-Text proxy: SvelteKit /api/v1/voice/transcribe forwards + # to mana-stt via Cloudflare Tunnel. The browser never sees the API + # key — it stays server-side. MANA_STT_URL: https://gpu-stt.mana.how MANA_STT_API_KEY: ${MANA_STT_API_KEY:-} + # LLM proxy: /api/v1/voice/parse-task and /api/v1/voice/parse-habit + # call mana-llm for structured extraction. Set WITHOUT the PUBLIC_ + # prefix because $env/dynamic/private explicitly excludes vars + # that start with the public prefix — so the parse endpoints + # would never see PUBLIC_MANA_LLM_URL even though it's right + # there in the compose env. Both vars exist; the public one + # is read by the browser-side playground and status page. + MANA_LLM_URL: http://mana-llm:3025 + MANA_LLM_API_KEY: ${MANA_LLM_API_KEY:-} ports: - "5000:5000" healthcheck: