Automatically upgrade older model requests and refresh defaults - #1
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
gpt-5.2,gpt-5.3-codex,gpt-5.5gpt-5.6-solgpt-5.4gpt-5.6-terragpt-5.4-mini,gpt-5.3-codex-sparkgpt-5.6-lunaThe replacement is checked against
KOTLM_ALLOWED_MODELSbefore 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.examplenow includegpt-6-astraand 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 testpassed 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 --checkpassed.