Repository navigation
A custom Codex build by Jet Sng for using LiteLLM with Slow/Flex requests. Based on Codex v0.166.0, source commit a5dc3f3aea9408df716a2b6d305006e8370273bc.
Guided setup (recommended)
Read the setup script, then run:
setup_script="$(mktemp -t codex-litellm-setup)"
curl --proto '=https' --tlsv1.2 -fL \
https://raw.githubusercontent.com/zjsng-trav/codex/main/scripts/install-codex-litellm.sh \
-o "$setup_script"
bash "$setup_script"It asks for your own gateway and key as needed, verifies the pinned archive SHA-256, writes a separate named profile, uses macOS Keychain, and adds an available zsh alias. Existing command/alias names are skipped, including codex; matching setups are reused on reruns. Full details are in the fork README.
Manual package installation
The attached macos-arm64.tar.gz is for Apple Silicon Macs. Verify it with shasum -a 256 -c SHA256SUMS, extract it, inspect install.sh, then run sh install.sh. The package README describes the provider/profile setup. Each user supplies their own gateway and API key.
Included: Codex + code-mode-host binaries, a GPT-6.1-Sol model catalog exposing /slow, and a launcher that uses the custom in-process server. No gateway keys or company configuration are included.
Custom behavior
- Preserve requested Flex tier for LiteLLM sampling requests.
- Retry Flex capacity failures without a fixed attempt limit, with local backoff of 5, 10, 20, 40, then 60 seconds (server retry advice can override timing). Esc interrupts the foreground turn.
stream_max_retries = 0disables these retries. - Store and display per-thread costs when LiteLLM reports
usage.costin USD. Historical missing costs are not reconstructed. - Include the custom auto-review provider configuration changes in the source build.
Flex eligibility, billing and availability depend on the gateway/provider. No specific savings are guaranteed. These are ad-hoc signed, non-notarized binaries, smoke-tested on macOS 15.6/Apple Silicon. This is a custom build, not an official OpenAI release.
Verification
Installed binary SHA-256 values match BUILD_INFO. Installer, launcher version, code-mode-host help, and refusal to overwrite an existing installation were smoke-tested before packaging. The guided setup additionally passed collision handling, installation paths containing spaces, rerun idempotence, alias execution, and offline configuration/catalog loading checks. The README and BUILD_INFO contain provenance and limitations. Apache-2.0 license and upstream NOTICE are included.