Skip to content

GodeXMake every model a Codex engine.

OpenAI-compatible Responses API gateway for Codex, CLI tools and developer agents.

GodeX Logo

How It Works

GodeX sits between your tools and upstream model providers. It accepts OpenAI Responses API requests, translates them to Chat Completions API calls via the bridge kernel and provider specs, and streams results back — preserving the full protocol semantics that Codex expects.

Quick Start

bash
# Install — no Bun required at runtime
npm install -g @ahoo-wang/godex

# Create config interactively
godex init

# Start the gateway
godex serve

Point Codex CLI at your GodeX instance:

bash
export OPENAI_BASE_URL=http://localhost:5678/v1
export OPENAI_API_KEY=any-value
codex

INFO

Read the full Getting Started guide or explore the Architecture.

Documentation Map

SectionDescriptionStart Here
Getting StartedOverview, quick start, config, providersOverview
ArchitectureEnd-to-end request flow, core typesArchitecture Overview
Bridge KernelCompatibility, request/response, tools, outputCompatibility
Responses PipelineSync and streaming orchestrationSync Pipeline
Provider DevelopmentHow to add a new LLM providerProvider Spec
Session ManagementMulti-turn conversation supportSession Stores
Trace SystemRequest tracing and observabilityTrace System
Error HandlingError hierarchy and propagationError Handling
CLICommand-line interface referenceCLI
DeploymentDocker, native binary, CI/CDDeployment
OnboardingAudience-tailored guidesContributor Guide

Key Files

FileResponsibilitySource
src/index.tsEntry point — delegates to CLIsrc/index.ts:1-5
src/server/server.tsBun HTTP server, route mapsrc/server/server.ts:21-51
src/responses/runtime.tsBridge runtime, pipeline wiringsrc/responses/runtime.ts:19-41
src/bridge/request/request-builder.tsResponses → Chat Completionssrc/bridge/request/request-builder.ts:54-92
src/bridge/provider-spec/contract.tsProviderSpec and ProviderEdge typessrc/bridge/provider-spec/contract.ts:54-94
src/providers/builtin.tsBuilt-in provider registrysrc/providers/builtin.ts:37-55
src/session/types.tsSession store interfacesrc/session/types.ts:99-121
src/config/schema.tsConfiguration type definitionssrc/config/schema.ts:62-71
src/error/godex-error.tsBase error class hierarchysrc/error/godex-error.ts:2-35

Tech Stack

TechnologyPurposeVersion
BunRuntime, test runner, SQLite, binary compilation>=1.2
TypeScriptLanguage (strict, ESNext, ESM)^6
BiomeFormatting and linting^2.4
Commander.jsCLI framework^15
LogTapeStructured logging^2.1
SQLiteSessions and trace storagebuilt-in
fetcherHTTP client with SSE^3.16