diff --git a/api/relay.ts b/api/relay.ts index dd6eee6..979d4a0 100644 --- a/api/relay.ts +++ b/api/relay.ts @@ -29,10 +29,7 @@ import { createRateLimiter } from "../src/middleware/rate-limiter"; import { logRelayEvent } from "../src/middleware/logger"; import { handleChatCompletion, listModels } from "../src/lib/ai-proxy"; import { handleAnthropicMessages } from "../src/lib/anthropic-proxy"; - -// Read test-api.html at module scope so Bun's bundler inlines the content -// at build time (Vercel serverless has no filesystem at runtime). -const testApiHtmlRaw = await Bun.file("public/test-api.html").text(); +import testApiHtmlRaw from "./test-api-content"; // ─── Configuration ────────────────────────────────────────────────────────────── diff --git a/api/test-api-content.ts b/api/test-api-content.ts new file mode 100644 index 0000000..f8acb33 --- /dev/null +++ b/api/test-api-content.ts @@ -0,0 +1 @@ +export default "\n\n\n \n \n Edge Proxy — API Test\n \n\n\n
\n

Edge Proxy Relay — API Test

\n

Test all proxy endpoints from the browser

\n\n \n
\n
\n AUTH API Key\n \n
\n
\n \n
\n \n \n
\n
\n
\n\n \n
\n
\n GET /health\n \n
\n
\n \n
\n
\n
\n\n \n
\n
\n GET /v1/models\n \n
\n
\n \n
\n
\n
\n\n \n
\n
\n POST /v1/chat/completions\n \n
\n
\n \n \n \n \n \n
\n
\n
\n
\n\n \n
\n
\n POST /v1/messages (Anthropic)\n \n
\n
\n \n \n \n \n \n \n \n
\n
\n
\n
\n\n \n
\n
\n RELAY Generic HTTP Relay\n \n
\n
\n \n \n \n \n \n \n \n \n
\n
\n
\n
\n\n
\n
\n\n\n\n\n";