Files
random-proxy-simple/setup.md
T
2026-05-06 22:32:56 +08:00

91 lines
3.5 KiB
Markdown

Clone and run https://git.komnenos.me/springfw/random-proxy-simple in ./random-proxy-simple.
Goal: get the app running once on port 3000 with OpenAI and Anthropic Replit AI Integrations wired.
Bearer token for this deployment: DEPLOYMENT_GENERATED_PROXY_TOKEN
Important: wire OpenAI and Anthropic via the ai-integrations-openai and
ai-integrations-anthropic skills. Call setupReplitAIIntegrations directly. Do not call
searchIntegrations. OpenAI and Anthropic are Replit AI Integrations that provide
AI_INTEGRATIONS_* variables; they are not OAuth connectors.
Do not:
- add it to a parent workspace
- move it into artifacts/
- modify source files
- edit package.json
- create config.json or /tmp config files
- inspect/free unrelated ports
- use nohup/setsid/background shell tricks
- call searchIntegrations
- search the Replit integrations catalog
- create provider API secrets manually
- use public OpenAI or Anthropic endpoints
- invent, rotate, print, store, or replace the bearer token
- run a foreground server command directly in the shell
- run verification commands
- run chat-completion smoke tests unless asked
Publishability requirement: register the cloned app as a deployable artifact in-place. Do not move
the repo into artifacts/.
Steps:
1. Clone into ./random-proxy-simple.
2. Wire OpenAI and Anthropic via the ai-integrations-openai and ai-integrations-anthropic
skills:
- call setupReplitAIIntegrations directly
- do not call searchIntegrations
3. From ./random-proxy-simple, run:
pnpm install --ignore-workspace
4. Create the smallest persistent workflow named "Random Proxy Simple" with this exact run command:
cd random-proxy-simple && pnpm dev -- --host 0.0.0.0 --port 3000 --proxy-api-key DEPLOYMENT_GENERATED_PROXY_TOKEN --openai-base-url "$AI_INTEGRATIONS_OPENAI_BASE_URL" --openai-api-key "$AI_INTEGRATIONS_OPENAI_API_KEY" --anthropic-base-url "$AI_INTEGRATIONS_ANTHROPIC_BASE_URL" --anthropic-api-key "$AI_INTEGRATIONS_ANTHROPIC_API_KEY"
5. Start/restart that workflow once.
6. Confirm ./random-proxy-simple/.replit-artifact/artifact.toml exists so Replit Publish has a
production run command. If it is missing or changed, restore this exact file content:
kind = "api"
previewPath = "/"
title = "Random Proxy Simple"
version = "1.0.0"
id = "random-proxy-simple"
[[services]]
localPort = 3000
name = "Random Proxy Simple"
paths = ["/", "/api", "/v1"]
[services.development]
run = "cd random-proxy-simple && pnpm dev -- --host 0.0.0.0 --port 3000 --proxy-api-key DEPLOYMENT_GENERATED_PROXY_TOKEN --openai-base-url \"$AI_INTEGRATIONS_OPENAI_BASE_URL\" --openai-api-key \"$AI_INTEGRATIONS_OPENAI_API_KEY\" --anthropic-base-url \"$AI_INTEGRATIONS_ANTHROPIC_BASE_URL\" --anthropic-api-key \"$AI_INTEGRATIONS_ANTHROPIC_API_KEY\""
[services.production.build]
args = ["sh", "-c", "cd random-proxy-simple && pnpm install --ignore-workspace && pnpm run build"]
[services.production.build.env]
NODE_ENV = "production"
[services.production.run]
args = ["sh", "-c", "cd random-proxy-simple && node --enable-source-maps dist/index.mjs"]
[services.production.run.env]
PORT = "8080"
PROXY_API_KEY = "DEPLOYMENT_GENERATED_PROXY_TOKEN"
NODE_ENV = "production"
[services.production.health.startup]
path = "/api/healthz"
7. Do not run health, dashboard, model-list, or chat-completion verification commands.
Report only:
- local URL
- whether setupReplitAIIntegrations wired OpenAI and Anthropic
- whether the in-place deployable artifact has a production run command
- that no verification commands were run