Drop-in OpenAI Replacement
Point Codex or any OpenAI SDK at GodeX — no code changes needed. Translates Responses API to Chat Completions transparently, with tool calling, streaming, and structured output adapted per provider.
OpenAI-compatible Responses API gateway for Codex, CLI tools and developer agents.
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.
# Install — no Bun required at runtime
npm install -g @ahoo-wang/godex
# Create config interactively
godex init
# Start the gateway
godex servePoint Codex CLI at your GodeX instance:
export OPENAI_BASE_URL=http://localhost:5678/v1
export OPENAI_API_KEY=any-value
codexINFO
Read the full Getting Started guide or explore the Architecture.
| Section | Description | Start Here |
|---|---|---|
| Getting Started | Overview, quick start, config, providers | Overview |
| Architecture | End-to-end request flow, core types | Architecture Overview |
| Bridge Kernel | Compatibility, request/response, tools, output | Compatibility |
| Responses Pipeline | Sync and streaming orchestration | Sync Pipeline |
| Provider Development | How to add a new LLM provider | Provider Spec |
| Session Management | Multi-turn conversation support | Session Stores |
| Trace System | Request tracing and observability | Trace System |
| Error Handling | Error hierarchy and propagation | Error Handling |
| CLI | Command-line interface reference | CLI |
| Deployment | Docker, native binary, CI/CD | Deployment |
| Onboarding | Audience-tailored guides | Contributor Guide |
| File | Responsibility | Source |
|---|---|---|
src/index.ts | Entry point — delegates to CLI | src/index.ts:1-5 |
src/server/server.ts | Bun HTTP server, route map | src/server/server.ts:21-51 |
src/responses/runtime.ts | Bridge runtime, pipeline wiring | src/responses/runtime.ts:19-41 |
src/bridge/request/request-builder.ts | Responses → Chat Completions | src/bridge/request/request-builder.ts:54-92 |
src/bridge/provider-spec/contract.ts | ProviderSpec and ProviderEdge types | src/bridge/provider-spec/contract.ts:54-94 |
src/providers/builtin.ts | Built-in provider registry | src/providers/builtin.ts:37-55 |
src/session/types.ts | Session store interface | src/session/types.ts:99-121 |
src/config/schema.ts | Configuration type definitions | src/config/schema.ts:62-71 |
src/error/godex-error.ts | Base error class hierarchy | src/error/godex-error.ts:2-35 |
| Technology | Purpose | Version |
|---|---|---|
| Bun | Runtime, test runner, SQLite, binary compilation | >=1.2 |
| TypeScript | Language (strict, ESNext, ESM) | ^6 |
| Biome | Formatting and linting | ^2.4 |
| Commander.js | CLI framework | ^15 |
| LogTape | Structured logging | ^2.1 |
| SQLite | Sessions and trace storage | built-in |
| fetcher | HTTP client with SSE | ^3.16 |