From 40036abb9d6f4adc8ef4458742d508f984461c7f Mon Sep 17 00:00:00 2001 From: Frank Date: Mon, 4 Aug 2025 21:08:28 -0400 Subject: wip: gateway --- infra/app.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'infra') diff --git a/infra/app.ts b/infra/app.ts index 5c646d97c..2b09516d7 100644 --- a/infra/app.ts +++ b/infra/app.ts @@ -46,3 +46,15 @@ new sst.cloudflare.x.Astro("Web", { VITE_API_URL: api.url, }, }) + +const OPENCODE_API_KEY = new sst.Secret("OPENCODE_API_KEY") +const ANTHROPIC_API_KEY = new sst.Secret("ANTHROPIC_API_KEY") +const OPENAI_API_KEY = new sst.Secret("OPENAI_API_KEY") +const ZHIPU_API_KEY = new sst.Secret("ZHIPU_API_KEY") + +export const gateway = new sst.cloudflare.Worker("GatewayApi", { + domain: `api.gateway.${domain}`, + handler: "packages/function/src/gateway.ts", + url: true, + link: [OPENCODE_API_KEY, ANTHROPIC_API_KEY, OPENAI_API_KEY, ZHIPU_API_KEY], +}) -- cgit v1.2.3