fix: preserve custom provider model capabilities on switch#1107
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4693891327
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| ...(options.inferRuntimeModelInputs | ||
| ? { input: inferCustomModelInputModalities(id) } |
There was a problem hiding this comment.
Apply inferred inputs to existing rows without input
When a custom provider already has a model row for the selected ID but that row was previously flattened to just { id, name }, this newly inferred input value is never used: mergeProviderModels(registryModels, existingModels, runtimeModels) keeps the existing row first and skips the runtime row with the same ID. In the common upgrade case where an older ClawX switch already removed input: ["text", "image"], switching back to a known vision model such as claude-opus-4-6 still leaves it text-only, so the fix does not repair affected configs unless the user manually deletes the stale row.
Useful? React with 👍 / 👎.
Summary
fix: preserve custom provider model capabilities on switch
Related Issue(s)
Closes #1105
Type of Change
Validation
Checklist