feat(model): remove deprecated Cohere Command models, add migration, and set translation model as default - #2006
Conversation
- Remove deprecated models from LLM_PROVIDER_MODELS.cohere: command, command-nightly, command-light, command-light-nightly, command-r, command-r-03-2024, command-r-plus, command-r-plus-04-2024 - Add command-r-plus-08-2024 (live, was missing) - Bump CONFIG_SCHEMA_VERSION to 89 - Add v088 -> v089 migration to remap saved Cohere provider configs - Update changeset
- Check both selected model and custom model for deprecated Cohere ids - Set isCustomModel: false and customModel: null on migration, matching the xAI Grok v079-to-v080 migration behavior
Use Cohere's dedicated translation model as the default for new Cohere providers, aligning with the extension's translation focus.
🦋 Changeset detectedLatest commit: 10a5080 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor trust score27/100 — New contributor This score estimates contributor familiarity with Outcome
Score breakdown
Signals used
Policy
Updated automatically when the PR changes or when a maintainer reruns the workflow. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a065b2d010
ℹ️ 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".
Codex review noted that the v088 -> v089 migration was checking the dormant built-in model field first and clearing active custom models. resolveModelId() uses customModel when isCustomModel is true, so the migration now prioritizes customModel in that case and only falls back to the built-in model field otherwise. Added v088-to-v089.test.ts covering built-in, custom, and preserved custom-model scenarios.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 22eb119308
ℹ️ 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".
mengxi-ream
left a comment
There was a problem hiding this comment.
Thank you for the PR. But please check what AI wrote before submitting the PR!
…and changesets - Remap deprecated dormant Cohere selectors while preserving isCustomModel/customModel - Make v089 migration fixture self-contained - Restore prior patch changeset and add a new patch changeset for this PR
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 075994b97a
ℹ️ 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".
|
|
||
| // `model` is always schema-validated against the live enum, even when custom | ||
| // mode is active. Remap a deprecated dormant selector so validation passes. | ||
| const selectedModel = getNormalizedModelId(modelConfig.model) |
There was a problem hiding this comment.
Remap deprecated IDs stored as the active custom model
When a user enabled custom mode while a now-deprecated built-in was selected, TranslateModelSelector copied that ID into customModel; this lookup examines only the dormant model field. Although that selector gets remapped, resolveModelId continues returning the deprecated customModel, so translations still target the retired model after migration. Remap customModel when it matches this replacement table while preserving unrelated private model IDs.
Useful? React with 👍 / 👎.
main moved to v090 while this branch was open, so the v088 -> v089 slot this branch had claimed is now the video-subtitles toggleShortcut migration (mengxi-ream#2018) and v089 -> v090 is the hover forceRetranslation one (mengxi-ream#2017). Conflict resolution: - v088-to-v089.ts, its test and example/v089.ts keep main's versions. - The Cohere migration moves to v090-to-v091.ts, CONFIG_SCHEMA_VERSION is 91, and example/v091.ts is regenerated from main's v090.ts (the migration is a no-op for every fixture there, none of which configures a Cohere provider). While renumbering, the migration also stops leaving a retired model id in `customModel`. Ticking "enter custom model" copies the selected id into that field, so a user who did it while a retired model was selected kept an id like `command-r-plus` as their *active* model: `resolveModelId` returns `customModel` in custom mode, and unlike `model` that field is free text, so it passed schema validation and silently kept calling an endpoint Cohere shut down on 2025-09-15. A retired custom value now falls back to the selector the way v079-to-v080 handled xAI; a custom value that is not a retired id is still left alone, since it may be a private deployment behind a custom baseURL. `command`/`command-light` now map to `command-a-03-2025` rather than `command-r7b-12-2024`, matching the replacements Cohere's own deprecation notice lists. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Restores the regression test this branch had deleted, now asserting the exact list rather than a subset: the point of the branch is that retired ids must not come back, and `toContain` cannot catch that. Matches the neighbouring Anthropic and Ollama assertions in the same describe block. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Type of Changes
Description
Follow-up to #2004. The previous Cohere PR was squash-merged with only the two new model additions. This PR completes the cleanup that was in the original branch but not in the merge:
Removes deprecated Cohere Command models from
LLM_PROVIDER_MODELS.cohere:commandcommand-nightlycommand-lightcommand-light-nightlycommand-rcommand-r-03-2024command-r-pluscommand-r-plus-04-2024Adds missing currently-live models:
command-a-plus-05-2026command-a-03-2025command-a-reasoning-08-2025command-a-vision-07-2025command-a-translate-08-2025command-r-plus-08-2024command-r-08-2024(already present)command-r7b-12-2024Changes the default Cohere model for new providers to
command-a-translate-08-2025, the model optimized for translation.Bumps
CONFIG_SCHEMA_VERSIONfrom 88 → 89 and adds av088 → v089migration that remaps any saved Cohere provider using a deprecated model to the closest live model:command-r/command-r-03-2024→command-r-08-2024command-r-plus/command-r-plus-04-2024→command-r-plus-08-2024command/command-nightly/command-light/command-light-nightly→command-r7b-12-2024The migration follows the same pattern as
v079 → v080(xAI Grok): it checks both the selected model and the custom model, then clearsisCustomModel/customModelafter remapping.Related Issue
#2004
How Has This Been Tested?
Verified through manual testing
pnpm type-checkpassespnpm lintpassespnpm fmt:checkpassesSKIP_FREE_API=true pnpm testpasses: 245 test files / 2,278 tests passedScreenshots
n/a
Checklist