Skip to content

fix: preserve custom provider model capabilities on switch#1107

Merged
su8su merged 1 commit into
mainfrom
fix_custom_model
Jun 9, 2026
Merged

fix: preserve custom provider model capabilities on switch#1107
su8su merged 1 commit into
mainfrom
fix_custom_model

Conversation

@su8su

@su8su su8su commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

fix: preserve custom provider model capabilities on switch

Related Issue(s)

Closes #1105

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactor
  • Other

Validation

Checklist

  • I ran relevant checks/tests locally.
  • I updated docs if behavior or interfaces changed.
  • I verified there are no unrelated changes in this PR.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +1523 to +1524
...(options.inferRuntimeModelInputs
? { input: inferCustomModelInputModalities(id) }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@su8su su8su merged commit 71ea96a into main Jun 9, 2026
6 checks passed
@su8su su8su deleted the fix_custom_model branch June 9, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: 切换自定义Provider的模型时,models[].input字段被自动清除,导致图片能力丢失

1 participant