Skip to content

Automatically upgrade older model requests and refresh defaults - #1

Merged
IRus merged 1 commit into
mainfrom
codex/automatic-model-upgrades
Sep 20, 2026
Merged

IRus merged 1 commit into
mainfrom
codex/automatic-model-upgrades

Conversation

@IRus

@IRus IRus commented Sep 19, 2026

Copy link
Copy Markdown
Member

Requests that still select older Codex models can fail locally or reach a retired upstream model. This change upgrades known older names to current models in the same capability/speed tier for both Responses and Chat Completions, including streaming.

Requested model Replacement
gpt-5.2, gpt-5.3-codex, gpt-5.5 gpt-5.6-sol
gpt-5.4 gpt-5.6-terra
gpt-5.4-mini, gpt-5.3-codex-spark gpt-5.6-luna

The replacement is checked against KOTLM_ALLOWED_MODELS before contacting the provider. Current names pass through unchanged, and unknown names or dated variants receive no automatic upgrade. Chat response model fallbacks use the model actually sent upstream.

Defaults in Kotlin, Compose, and .env.example now include gpt-6-astra and the three GPT-5.6 models. Spark and GPT-5.5 are removed from defaults. The README documents the mappings, retirement dates, and migration of existing environment overrides. Mappings are maintained explicitly; this does not add live model discovery or retries on provider errors.

Validation: ./kotlin test passed all 60 tests, covering model mappings, target allowlist enforcement, current-model passthrough, both endpoints with JSON and streaming responses, missing provider model fields, and usage accounting. Upstream calls are mocked. git diff --check passed.

@IRus
IRus merged commit fad0b02 into main Sep 20, 2026
2 checks passed
@IRus
IRus deleted the codex/automatic-model-upgrades branch September 20, 2026 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant