For the complete documentation index, see llms.txt. This page is also available as Markdown.

Codex Desktop

For beginners on macOS or Windows. Configure it by editing a config.toml file from Settings β€” you can ask an AI to help draft it, no need to know TOML syntax. Codex Desktop will use GreenNode's self-hosted GLM 5.2 model.

First, complete the Prerequisites: an ACTIVE API key, the Base URL, and the GLM 5.2 model ENABLED. This page only covers install and configuration.

You'll need these 3 values (from the Prerequisites page):

Info
Value

Base URL (OpenAI standard)

https://maas-llm-aiplatform-hcm.api.vngcloud.vn/v1 (with /v1)

Base URL (Token Plan / package key)

https://tokenplan.api.greennode.ai/v1 β€” see Token Plan

API key

yourvn-... key

Model ID

z-ai/glm-5.2

GLM 5.2 is just an example model. GreenNode offers many models β€” swap in whichever one you want. Each model's Model ID and Base URL are on its model detail page.


Step 1 β€” Download and install Codex Desktop

Go to openai.com/index/introducing-the-codex-app and download the app for your machine, then install it like a normal app.


Step 2 β€” Open the app and log in

Open Codex and log in with your ChatGPT/OpenAI account.

Codex home screen after logging in

Step 3 β€” Open the config.toml file

  1. Click your avatar/account name in the bottom-left corner β†’ Settings.

  2. In the left search box, type "config.toml".

  3. Click Open config.toml in the top-right of the Custom config.toml settings section β€” the file opens in your machine's default editor.

Find and open config.toml in Settings

Step 4 β€” Add the self-hosted model configuration

Add the following block to the end of config.toml (keep the existing content above it):

Key fields explained:

Field
Purpose

model_providers.vngcloud-glm

A provider name you choose β€” reused inmodel_provider below

base_url

The OpenAI-standard Base URL,with /v1

experimental_bearer_token

Your API key, pasted directly into the file β€” Codex Desktop doesn't need an exported env var like the CLI

wire_api

Keep as"responses" β€” the Responses API standard Codex Desktop uses

stream_idle_timeout_ms

Max idle time (ms) before the stream is treated as timed out

request_max_retries

Number of retries on a failed request

supports_websockets

Keep as false β€” MaaS doesn't support websockets yet

profiles.glm

A profile name you choose β€” appears in the app's model picker

model

The Model ID sent to MaaS

model_provider

Points back to the provider declared above

model_context_window

Set manually since MaaS doesn't expose model metadata

model_auto_compact_token_limit

Token threshold at which Codex auto-compacts the context

model_reasoning_effort

Default reasoning effort (low / medium / high)

model_reasoning_summary

Keep as "auto" β€” lets Codex decide whether to summarize its reasoning

Not comfortable with TOML syntax? Copy the full content of your current config.toml, paste it into an AI chat (Codex, ChatGPT, Claude...) along with the 3 values above (Base URL / API key / Model ID), and ask it to write the [model_providers.*] and [profiles.*] blocks in the correct Codex format, then paste the result back into the file.


Step 5 β€” Save the file and restart Codex

  1. Save config.toml.

  2. Fully quit and reopen Codex Desktop.


Step 6 β€” Verify

  1. In the chat panel, click the model picker (bottom-right corner, e.g. "5.6 Terra Medium").

  2. Find the profile you just added (e.g. glm) in the list β€” select it.

  3. Type a test message, e.g. "Write a function to add two numbers in Python." If it responds, you're set.

  4. Check the AI Platform Console to see the call logged.

Configuration succeeded β€” chat responds and the model picker shows "Custom" instead of the default model

Troubleshooting

Symptom
Cause
Fix

New profile doesn't show in the model picker

App wasn't restarted, or the[profiles.*] section name is wrong

Fully quit and reopen Codex; recheck the TOML syntax

401 / "Unauthorized"

Wrong or not-yet-ACTIVE API key

Recheck your key; wait forACTIVE status

404 / "Not Found"

Wrong Base URL (missing/v1)

Should be exactlyhttps://maas-llm-aiplatform-hcm.api.vngcloud.vn/v1

App errors out / can't read config

Invalid TOML syntax (missing quotes, wrong indentation)

Ask an AI to check the block you added, or compare it against the Step 4 sample

No response even with the right model selected

Out of credit, model auto-disabled

Top up credit in the AI Platform Console

Switched models via the model picker (UI) and the self-hosted model stopped working

model and model_provider in config.toml are out of sync β€” the picker only overwrites model, not model_provider

Reopenconfig.toml, fix model / model_provider back to a matching pair (see the Step 4 sample), save, and restart Codex


I want to next...
Go to

Use the CLI version

See the prerequisites

View usage & billing


Need help?

If you've followed the steps and it's still not working, feel free to contact GreenNode Customer Support:

Thank you for using GreenNode's services.

Last updated