feat(codex): add GPT-6.2 models and update CLI version

- Add GPT-6.2 Astra and Sol to Codex team, plus, and pro model registries.
- Update the model fetcher’s default Codex client version to 0.169.0.
This commit is contained in:
Luis Pater
2026-11-18 06:17:20 +08:00
parent 51e6095890
commit a5e8f69e56
3 changed files with 1934 additions and 1354 deletions

View File

@@ -43,8 +43,8 @@ import (
const (
codexModelsBaseURL = "https://chatgpt.com/backend-api/codex"
codexModelsPath = "/models"
defaultClientVersion = "0.159.0"
defaultCodexUserAgent = "codex_cli_rs/0.159.0 (Mac OS 26.3.1; arm64) iTerm.app/3.6.9"
defaultClientVersion = "0.169.0"
defaultCodexUserAgent = "codex_cli_rs/0.169.0 (Mac OS 26.3.1; arm64) iTerm.app/3.6.9"
defaultCodexOriginator = "codex_cli_rs"
accessTokenRefreshLeeway = 30 * time.Second
baselineModelSlug = "gpt-5.5"

File diff suppressed because one or more lines are too long

View File

@@ -3092,6 +3092,76 @@
}
],
"codex-team": [
{
"id": "gpt-6.2-astra",
"object": "model",
"created": 1794942000,
"owned_by": "openai",
"type": "openai",
"display_name": "GPT 6.2 Astra",
"version": "gpt-6.2",
"description": "GPT-6.2 Astra is our most capable model for your hardest projects, from start to finish.",
"context_length": 272000,
"max_completion_tokens": 128000,
"supported_parameters": [
"tools"
],
"thinking": {
"levels": [
"low",
"medium",
"high",
"xhigh",
"max"
]
},
"supportedInputModalities": [
"text",
"image"
],
"supportedOutputModalities": [
"text"
],
"native_capabilities": {
"web_search": true
},
"support_configuration_update": true
},
{
"id": "gpt-6.2-sol",
"object": "model",
"created": 1794942000,
"owned_by": "openai",
"type": "openai",
"display_name": "GPT 6.2 Sol",
"version": "gpt-6.2",
"description": "GPT-6.2 Astra is our go-to model for everyday work, from coding to powering agents at scale.",
"context_length": 500000,
"max_completion_tokens": 128000,
"supported_parameters": [
"tools"
],
"thinking": {
"levels": [
"low",
"medium",
"high",
"xhigh",
"max"
]
},
"supportedInputModalities": [
"text",
"image"
],
"supportedOutputModalities": [
"text"
],
"native_capabilities": {
"web_search": true
},
"support_configuration_update": true
},
{
"id": "gpt-6-astra",
"object": "model",
@@ -3445,6 +3515,76 @@
}
],
"codex-plus": [
{
"id": "gpt-6.2-astra",
"object": "model",
"created": 1794942000,
"owned_by": "openai",
"type": "openai",
"display_name": "GPT 6.2 Astra",
"version": "gpt-6.2",
"description": "GPT-6.2 Astra is our most capable model for your hardest projects, from start to finish.",
"context_length": 272000,
"max_completion_tokens": 128000,
"supported_parameters": [
"tools"
],
"thinking": {
"levels": [
"low",
"medium",
"high",
"xhigh",
"max"
]
},
"supportedInputModalities": [
"text",
"image"
],
"supportedOutputModalities": [
"text"
],
"native_capabilities": {
"web_search": true
},
"support_configuration_update": true
},
{
"id": "gpt-6.2-sol",
"object": "model",
"created": 1794942000,
"owned_by": "openai",
"type": "openai",
"display_name": "GPT 6.2 Sol",
"version": "gpt-6.2",
"description": "GPT-6.2 Astra is our go-to model for everyday work, from coding to powering agents at scale.",
"context_length": 500000,
"max_completion_tokens": 128000,
"supported_parameters": [
"tools"
],
"thinking": {
"levels": [
"low",
"medium",
"high",
"xhigh",
"max"
]
},
"supportedInputModalities": [
"text",
"image"
],
"supportedOutputModalities": [
"text"
],
"native_capabilities": {
"web_search": true
},
"support_configuration_update": true
},
{
"id": "gpt-6-astra",
"object": "model",
@@ -3798,6 +3938,76 @@
}
],
"codex-pro": [
{
"id": "gpt-6.2-astra",
"object": "model",
"created": 1794942000,
"owned_by": "openai",
"type": "openai",
"display_name": "GPT 6.2 Astra",
"version": "gpt-6.2",
"description": "GPT-6.2 Astra is our most capable model for your hardest projects, from start to finish.",
"context_length": 272000,
"max_completion_tokens": 128000,
"supported_parameters": [
"tools"
],
"thinking": {
"levels": [
"low",
"medium",
"high",
"xhigh",
"max"
]
},
"supportedInputModalities": [
"text",
"image"
],
"supportedOutputModalities": [
"text"
],
"native_capabilities": {
"web_search": true
},
"support_configuration_update": true
},
{
"id": "gpt-6.2-sol",
"object": "model",
"created": 1794942000,
"owned_by": "openai",
"type": "openai",
"display_name": "GPT 6.2 Sol",
"version": "gpt-6.2",
"description": "GPT-6.2 Astra is our go-to model for everyday work, from coding to powering agents at scale.",
"context_length": 500000,
"max_completion_tokens": 128000,
"supported_parameters": [
"tools"
],
"thinking": {
"levels": [
"low",
"medium",
"high",
"xhigh",
"max"
]
},
"supportedInputModalities": [
"text",
"image"
],
"supportedOutputModalities": [
"text"
],
"native_capabilities": {
"web_search": true
},
"support_configuration_update": true
},
{
"id": "gpt-6-astra",
"object": "model",