Fix Codex ACP model selection#879
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ef5effd037
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const modelValues = Array.isArray(modelOption?.options) | ||
| ? modelOption.options.map(normalizeConfigOptionValue).filter(Boolean) | ||
| : []; |
There was a problem hiding this comment.
Flatten grouped ACP model options before parsing
normalizeConfigOptionsModels assumes modelOption.options is a flat array of values, but ACP allows SessionConfigSelectOptions to be grouped (SessionConfigSelectGroup with nested options). When an agent returns grouped model options, normalizeConfigOptionValue receives group objects (no value), all entries are filtered out, and modelValues becomes empty, so we silently fall back to legacy availableModels and lose the runtime model catalog this change is meant to use.
Useful? React with 👍 / 👎.
9b03a5c to
82914dc
Compare
82914dc to
784343a
Compare
Summary
Fixes #875
Tests