Skip to content

Integrate with Codex

Replace the placeholder values in the following snippet with your actual credentials and parameters, then run the script to integrate with F5 AI Security.

Add this snippet to the Codex configuration file, typically ~/.codex/config.toml:`:

toml
model_provider = "f5-ai-security"

[model_providers.f5-ai-security]
name = "F5-AI-security"
wire_api = "responses"
supports_websockets = false
env_key = "CALYPSOAI_TOKEN"
base_url = "{BASE_URL}/openai/{CONNECTION_NAME}"

Ensure the model_provider setting is not nested under another section in the config file, it should be at the top level.

With the following commands:

  • Set the CALYPSOAI_TOKEN environment variable to your API key
  • Run codex exec with a question to confirm the connection.
shell
export CALYPSOAI_TOKEN={CAI_TOKEN}
codex exec "What is the capital of France?"

You can integrate F5 AI Security. We provide a code snippet to help with the process, which requires the following variables:

  • BASE_URL: The URL of the AI Security deployment. Depends on whether your deployment uses AI Security SaaS or your own on-premises system.

  • CAI_TOKEN: See Get Your Authorization Token for instructions on how to obtain an API key.

  • CONNECTION_NAME: Name of the configured OpenAI connection that Codex should use.

Updated at: