Using Codex with the RCD LLM Service
Codex can be configured to use the RCD LLM Service through a custom provider in
~/.codex/config.toml.
If you are using Codex on Palmetto, see Codex on Palmetto for compute-session requirements, authentication options, and Palmetto-managed defaults.
Codex should use the base URL https://llm.rcd.clemson.edu/v1. The
chat-completions compatibility endpoint is useful for some other clients, but
Codex should be configured with the base URL.
Codex depends on the service's POST /v1/responses compatibility layer. The RCD
LLM Service currently provides this through a shim, so Codex support is
functional but may change more often than the chat-completions endpoint.
Codex undergoes rapid development and may break things for third-party LLM providers like the RCD LLM service. If things do not work, you may have to revert to an earlier tested version. Please go ahead and report any issues you experience in as much detail as you can, and we will try our best to update the shim.
Last tested version: Codex 0.141.0.
1. Create An API Key
First, request an allocation, sign in to the service, and create an API key:
2. Export The API Key
Store the key in an environment variable before starting Codex:
export RCD_LLM_API_KEY="your-api-key-here"
If you want this to be available in new shells automatically, add the same line
to your shell startup file such as ~/.zshrc.
3. Choose A Model
Check the Available Models page for the exact model name to use.
4. Create a new RCD LLM Service Profile
Create a new
profile file at
~/.codex/rcd-llms.config.toml
Then add the following:
model = "<model-name>"
model_provider = "rcd-llm"
web_search = "disabled"
[feature]
image_generation = false
[model_providers.rcd-llm]
name = "RCD LLM Service"
base_url = "https://llm.rcd.clemson.edu/v1"
stream_idle_timeout_ms = 600000
[model_providers.rcd-llm.auth]
command = "bash"
args = ["-c", "echo $RCD_LLM_API_KEY"]
Replace <model-name> with an exact model name from the Models
page.
The RCD LLM Service does not support server-side tools like web_search. They
must be disabled for things to function correctly.
An update to profiles was introduced recently. Make sure you are on a recent version of Codex.
Model Catalog
Using the "command auth" configuration above should mean that Codex will automatically fetch available models from our Codex compatible models endpoint.
Alternatively, you can manually
download the catalog
and save it as ~/.codex/rcd_llms_model_catalog.json. Then update
model_catalog_json in ~/.codex/rcd-llms.config.toml:
model_catalog_json = "~/.codex/rcd_llms_model_catalog.json"
5. Start A New Codex Session
After saving ~/.codex/rcd-llms.config.toml, start a new Codex session with the
rcd-llms profile:
codex -p rcd-llms
Notes
- You must still be on the Clemson network or connected through VPN.
- If the service model list changes, update the
modelvalue in~/.codex/config.toml. - Keep the API key out of Git repositories, shared shell scripts, and support tickets.