diff options
| author | Frank <[email protected]> | 2025-08-04 21:08:28 -0400 |
|---|---|---|
| committer | Frank <[email protected]> | 2025-08-04 21:08:29 -0400 |
| commit | 40036abb9d6f4adc8ef4458742d508f984461c7f (patch) | |
| tree | ddb125398fa255a711e1dd01f964046a98e03ced /infra/app.ts | |
| parent | 2970ba6416286fc78598d99a93cbb5fae1bfd4a6 (diff) | |
| download | opencode-40036abb9d6f4adc8ef4458742d508f984461c7f.tar.gz opencode-40036abb9d6f4adc8ef4458742d508f984461c7f.zip | |
wip: gateway
Diffstat (limited to 'infra/app.ts')
| -rw-r--r-- | infra/app.ts | 12 |
1 files changed, 12 insertions, 0 deletions
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], +}) |
