Skip to content

Quick Reference

CLI Commands

CommandDescription
godex serveStart the gateway server
godex initCreate godex.yaml interactively
bun run devHot-reload dev server on port 13145
bun run buildCompile native binary for current platform
bun run testUnit + integration tests
bun run test:e2eEnd-to-end tests with mocked upstream
bun run typecheckTypeScript type checking
bun run lintBiome lint
bun run ciFull CI pipeline

API Endpoints

MethodPathDescription
POST/v1/responsesCreate a response (streaming or non-streaming)
GET/v1/modelsList available models
GET/healthHealth check

Model Selection

model: "gpt-4o"         → resolved via default_provider model mapping
model: "zhipu/glm-4.7"  → explicit provider/model selector
model: "openai/gpt-4o"  → routes to configured openai provider

Environment Variables

VariableDescription
DEEPSEEK_API_KEYAPI key for the DeepSeek provider
ZHIPU_API_KEYAPI key for the Zhipu provider
MINIMAX_API_KEYAPI key for the MiniMax provider
OPENAI_BASE_URLPoint Codex CLI at GodeX
OPENAI_API_KEYMust be set (not validated by GodeX)

OpenAI SDK Usage

ts
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "http://localhost:5678/v1",
  apiKey: "any-value",
});

const response = await client.responses.create({
  model: "gpt-4o",
  input: "Hello!",
});

Architecture Overview