fix(codex): remove model_catalog_json — wrong format crashed Codex

model_catalog_json expects internal Codex ModelsResponse format with
complex ModelInfo structs (slug, display_name, visibility, shell_type,
supported_reasoning_levels, etc.), not simple OpenAI API format.
Removed from all configs to restore working state.

env_key = "OPENAI_API_KEY" fix is preserved (fixes 401 Unauthorized).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
delta-cloud-208e
2026-03-08 08:48:31 +00:00
parent 416720ae51
commit fa07058917
3 changed files with 0 additions and 60 deletions

View File

@@ -215,12 +215,10 @@ if (-not $pyCmd) {
Remove-Item $configToml -Force -ErrorAction SilentlyContinue
}
$catalogPath = "$configDir\model_catalog.json" -replace '\\', '/'
$tomlContent = @"
model = "gpt-5.4"
model_reasoning_effort = "high"
model_provider = "custom"
model_catalog_json = "$catalogPath"
approval_policy = "never"
sandbox_mode = "danger-full-access"
check_for_update_on_startup = false
@@ -246,19 +244,6 @@ wire_api = "responses"
[System.IO.File]::WriteAllText($configToml, $tomlContent)
Write-Host " config.toml created: $configToml" -ForegroundColor Green
# Create model catalog for model picker
$catalogFile = Join-Path $configDir "model_catalog.json"
$catalogJson = @"
[
{"id": "gpt-5.4", "object": "model", "created": 1700000000, "owned_by": "system"},
{"id": "gpt-5.3-codex-spark", "object": "model", "created": 1700000000, "owned_by": "system"},
{"id": "gpt-5.3-codex", "object": "model", "created": 1700000000, "owned_by": "system"},
{"id": "gpt-5.2-codex", "object": "model", "created": 1700000000, "owned_by": "system"}
]
"@
[System.IO.File]::WriteAllText($catalogFile, $catalogJson)
Write-Host " model_catalog.json created: $catalogFile" -ForegroundColor Green
# Set env vars via setx
& setx OPENAI_API_KEY "ClauderAPI" 2>$null | Out-Null
& setx OPENAI_BASE_URL "https://ai.37-187-136-86.sslip.io/v1" 2>$null | Out-Null