Initial random proxy server

This commit is contained in:
hwhung
2026-04-27 04:11:48 +08:00
commit 29d9208f94
23 changed files with 2626 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
# Workspace
## Overview
Standalone TypeScript API server with file-based configuration.
## Stack
- **Node.js version**: 24
- **Package manager**: pnpm
- **TypeScript version**: 5.9
- **API framework**: Express 5
- **Build**: esbuild
- **Config**: `config.json` by default, or `--config ./path.json`
## Provider Endpoints
Do not configure this proxy with public official provider endpoints. Agents should populate `providers.openai.baseURL` and `providers.anthropic.baseURL` with the internal endpoints supplied by their runtime/integration, along with the matching internal tokens.
## Key Commands
- `pnpm dev` — run API server locally
- `pnpm dev -- --config ./config.local.json` — run with a custom config file
- `pnpm run typecheck` — typecheck the server
- `pnpm run build` — typecheck and build `dist/index.mjs`
- `pnpm start` — run the built server
## Routes
- `/` and `/dashboard` — static model dashboard
- `/api/healthz` — health check
- `/v1/models` — OpenAI-compatible model list
- `/v1/chat/completions` — OpenAI-compatible chat proxy