Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ process.stdout.write("\n");
| `CodexTokens`, `FetchLike` | Types. |
| `CODEX_PROVIDER` | The `"codex"` provider id. |
| `CODEX_BASE_URL`, `CODEX_RESPONSES_PATH` | `https://chatgpt.com/backend-api` and `/codex/responses`. |
| `CODEX_DEFAULT_MODELS` | The models the Codex CLI's bundled catalog lists in its picker. |
| `CODEX_ACCOUNT_ID_OPTION` | `providerOptions` key sent as the `chatgpt-account-id` header. |
| `CODEX_SESSION_ID_OPTION` | `providerOptions` key sent as `prompt_cache_key` and the `session_id` header. |
| `CODEX_REASONING_EFFORT_OPTION` | `providerOptions` key sent as `reasoning.effort`; `"none"` omits it. |
Expand Down
14 changes: 14 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,20 @@ export const CODEX_AUTHORIZE_EXTRA_PARAMS: Record<string, string> = {
export const CODEX_BASE_URL = "https://chatgpt.com/backend-api";
export const CODEX_RESPONSES_PATH = "/codex/responses";

// The models the Codex CLI's bundled catalog lists in its picker
// (openai/codex@b1e72963c3, codex-rs/models-manager/models.json, visibility
// "list"), by priority.
export const CODEX_DEFAULT_MODELS = [
"gpt-6.1-sol",
"gpt-6-astra",
"gpt-6-sol",
"gpt-6-luna",
"gpt-5.6-sol",
"gpt-5.6-terra",
"gpt-5.6-luna",
"gpt-5.5",
] as const;

// Refresh a token this many milliseconds before its stated expiry so a
// request is never sent with a token about to lapse mid-flight.
export const CODEX_REFRESH_SKEW_MS = 60_000;
Expand Down
Loading