feat(codex): normalize config options and update binary version#1953
Merged
jonathanlab merged 1 commit intomainfrom Apr 30, 2026
Merged
Conversation
Generated-By: PostHog Code Task-Id: cb22f81b-7734-43fa-9c85-46aa40b66d40
Contributor
Prompt To Fix All With AIFix the following 2 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 2
packages/agent/src/adapters/codex/models.ts:45-50
**Server-provided `name` is always discarded**
`formatOption` unconditionally replaces `opt.name` with a value derived from `opt.value`, so any human-readable display name the server already sends (e.g. `"GPT-4.1 mini"`) is silently dropped. If the intent is to use the server name when present and only fall back to the computed one, the assignment should be conditional:
```typescript
const formatOption = (
opt: SessionConfigSelectOption,
): SessionConfigSelectOption => ({
...opt,
name: opt.name ?? formatCodexModelName(opt.value),
});
```
If the intent is always to override, a brief comment explaining why would prevent future readers from treating this as a bug.
### Issue 2 of 2
packages/agent/src/adapters/codex/models.ts:28-65
**Missing tests for normalization logic**
`formatCodexModelName` and `normalizeCodexConfigOptions` contain non-trivial transformation logic (regex digit-to-dot conversion, acronym lookup, capitalize-and-rejoin), but there are no tests for either function. Per the team's preference for parameterised tests, a test table with representative model name inputs (e.g. `gpt-4o`, `gpt-4-1`, `o4-mini`, `codex-mini-latest`) and their expected formatted output would be the right fit here.
Reviews (1): Last reviewed commit: "feat(codex): upgrade to codex-acp 0.12.0..." | Re-trigger Greptile |
k11kirky
approved these changes
Apr 30, 2026
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.
Problem
The Codex agent needs to format model names consistently across configuration options, and the codex-acp binary should be updated to the latest version (0.12.0).
Changes
Created with PostHog Code