Codex
Overview
OpenAI's terminal agent. It talks the OpenAI API natively, so LIBRA is a drop-in.
You need a LIBRA API key (libra_sk_...) from the console (API keys > Create key), and the base URL https://<your-host>/v1.
Installation
npm install -g @openai/codex
Configure LIBRA
~/.codex/config.toml:
model = "libra/smart"
model_provider = "libra"
[model_providers.libra]
name = "LIBRA"
base_url = "https://<your-host>/v1"
env_key = "LIBRA_API_KEY"
wire_api = "chat"
Then export LIBRA_API_KEY=libra_sk_....
Quick start (up and running in 5 minutes)
- Write the config, export the key.
- Run
codexin a project. - Ask "Siapa kamu?" to verify.
FAQ
- 404 / timeout? The base URL is missing
/v1or has an extra/chat/completions. Use exactlyhttps://<your-host>/v1. - Model not found? Model ids are case-sensitive and must match the console Models page, e.g.
libra/smartorasix-deepseek-v4/deepseek-v4-flash. - 401? The key is wrong, disabled or expired. 402? Your organization balance is Rp 0; see Credits.
- 403
model_not_allowed? The key's guardrails block that model. Ask your workspace Admin or pick another model.