2026-04-27 11:55:31 +08:00
2026-04-27 11:55:31 +08:00
2026-04-27 11:42:04 +08:00
2026-04-27 04:11:48 +08:00
2026-04-27 11:55:31 +08:00
2026-04-27 11:55:31 +08:00
2026-04-27 11:55:31 +08:00
2026-04-27 11:55:31 +08:00
2026-04-27 04:11:48 +08:00
2026-04-27 04:11:48 +08:00
2026-04-27 04:11:48 +08:00

Agent Instructions

This repository is a standalone Express API server. It is not intended to be added to a parent workspace.

Run Exactly

pnpm install --ignore-workspace
pnpm dev

The server starts with built-in defaults even when config.json does not exist:

  • host: 0.0.0.0
  • port: 8080
  • proxy bearer token: dev-proxy-key

Do not create config.json unless internal provider endpoints are available.

Fill Provider Config

Only if internal provider endpoints are available:

cp config.example.json config.json

Then fill only these values:

{
  "providers": {
    "openai": {
      "apiKey": "internal-openai-token",
      "baseURL": "https://your-internal-openai-endpoint/v1"
    },
    "anthropic": {
      "apiKey": "internal-anthropic-token",
      "baseURL": "https://your-internal-anthropic-endpoint"
    }
  }
}

Use internal endpoints supplied by the runtime/integration. Do not use public official provider endpoints.

If provider endpoints are not available, leave config absent. The dashboard, health check, and model list still work. Chat completion calls return 503 until the target provider has both apiKey and baseURL.

Routes

  • GET / and GET /dashboard - static model dashboard
  • GET /api/healthz - health check
  • GET /v1/models - OpenAI-compatible model list
  • POST /v1/chat/completions - OpenAI-compatible chat proxy

The /v1/* routes require:

Authorization: Bearer <proxy.apiKey>

Verification

curl -s http://localhost:8080/dashboard | head
curl -s http://localhost:8080/api/healthz
curl -s -H "Authorization: Bearer dev-proxy-key" http://localhost:8080/v1/models

Expected chat result without provider config: 503 with a message asking for providers.<name>.apiKey and providers.<name>.baseURL.

Production

pnpm build
pnpm start
S
Description
No description provided
Readme 123 KiB
Languages
TypeScript 87.2%
JavaScript 12.8%