Skip to content

feat(model): remove deprecated Cohere Command models, add migration, and set translation model as default - #2006

Merged
mengxi-ream merged 8 commits into
mengxi-ream:mainfrom
thedavidweng:feat/cohere-remove-deprecated-models
Aug 1, 2026
Merged

mengxi-ream merged 8 commits into
mengxi-ream:mainfrom
thedavidweng:feat/cohere-remove-deprecated-models

Conversation

@thedavidweng

Copy link
Copy Markdown
Contributor

AI model(s) used (required): Claude

Type of Changes

  • ✨ New feature (feat)

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:

    • command
    • command-nightly
    • command-light
    • command-light-nightly
    • command-r
    • command-r-03-2024
    • command-r-plus
    • command-r-plus-04-2024
  • Adds missing currently-live models:

    • command-a-plus-05-2026
    • command-a-03-2025
    • command-a-reasoning-08-2025
    • command-a-vision-07-2025
    • command-a-translate-08-2025
    • command-r-plus-08-2024
    • command-r-08-2024 (already present)
    • command-r7b-12-2024
  • Changes the default Cohere model for new providers to command-a-translate-08-2025, the model optimized for translation.

  • Bumps CONFIG_SCHEMA_VERSION from 88 → 89 and adds a v088 → v089 migration that remaps any saved Cohere provider using a deprecated model to the closest live model:

    • command-r / command-r-03-2024 → command-r-08-2024
    • command-r-plus / command-r-plus-04-2024 → command-r-plus-08-2024
    • command / command-nightly / command-light / command-light-nightly → command-r7b-12-2024

The migration follows the same pattern as v079 → v080 (xAI Grok): it checks both the selected model and the custom model, then clears isCustomModel / customModel after remapping.

Related Issue

#2004

How Has This Been Tested?

  • Verified through manual testing

  • pnpm type-check passes

  • pnpm lint passes

  • pnpm fmt:check passes

  • SKIP_FREE_API=true pnpm test passes: 245 test files / 2,278 tests passed

Screenshots

n/a

Checklist

  • I have tested these changes locally
  • I have updated the documentation accordingly if necessary
  • My code follows the code style of this project
  • My changes do not break existing functionality
  • If my code was generated by AI, I have proofread and improved it as necessary.

- 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-bot

changeset-bot Bot commented Jul 31, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 10a5080

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@read-frog/extension Patch

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

@github-actions github-actions Bot added the feat label Jul 31, 2026
@github-actions

github-actions Bot commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

Contributor trust score

27/100 — New contributor

This score estimates contributor familiarity with mengxi-ream/read-frog using public GitHub signals. It is advisory only and does not block merges automatically.

Outcome

Score breakdown

Dimension Score Signals
Repo familiarity 11/35 commits in repo, merged PRs, reviews
Community standing 7/25 account age, followers, repo role
OSS influence 5/20 stars on owned non-fork repositories
PR track record 4/20 merge rate across resolved PRs in this repo

Signals used

  • Repo commits: 1 (author commits reachable from the repository default branch)
  • Repo PR history: merged 1, open 1, closed-unmerged 0
  • Repo reviews: 0
  • PR counted changed lines: 43 (+22 / -21)
  • Migration-related changed lines excluded: 1877 (+1877 / -0)
  • Repo permission: read
  • Followers: 33
  • Account age: 56 months
  • Owned non-fork repos considered: max 24, total 99 (thedavidweng/china-village-boundaries (24), thedavidweng/monarchmoney-cli (22), thedavidweng/OpenKara (20), thedavidweng/hermes-dashboard-theme-porcelain (12), thedavidweng/skills (11), thedavidweng/sdf-flash-gui (3), thedavidweng/opencard-db (1), thedavidweng/strudel-tui (1), thedavidweng/cod4-cn-patch (1), thedavidweng/money (1), thedavidweng/lyric-romanizer (1), thedavidweng/OpenLoop (1), thedavidweng/Twine-Immigration-Act (1), thedavidweng/ArchiveMediaDrive (0), thedavidweng/Run-and-Jump (0), thedavidweng/biliarchiver-tgbot (0), thedavidweng/vapourfly (0), thedavidweng/awesome-game-translations (0), thedavidweng/site (0), thedavidweng/cli-workflow-template (0))

Policy

  • Low-score review threshold: < 30
  • Auto-close: score < 20 and counted changed lines > 1000
  • Migration-related files are excluded from the auto-close line count
  • Policy version: v1.2

Updated automatically when the PR changes or when a maintainer reruns the workflow.

@github-actions github-actions Bot added contrib-trust:new PR author trust score is 0-29. needs-maintainer-review Contributor trust automation recommends maintainer review. labels Jul 31, 2026

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

Copy link
Copy Markdown

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

Comment thread src/utils/config/migration-scripts/v088-to-v089.ts Outdated
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.

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

Copy link
Copy Markdown

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

Comment thread src/utils/config/migration-scripts/v088-to-v089.ts Outdated

@mengxi-ream mengxi-ream left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thank you for the PR. But please check what AI wrote before submitting the PR!

Comment thread src/utils/config/__tests__/example/v089.ts
Comment thread src/utils/config/migration-scripts/v088-to-v089.ts Outdated
Comment thread .changeset/cohere-command-a-plus-translate.md Outdated
…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

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

Copy link
Copy Markdown

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: 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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

mengxi-ream and others added 2 commits July 31, 2026 23:09
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>
@mengxi-ream
mengxi-ream merged commit bd354b2 into mengxi-ream:main Aug 1, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contrib-trust:new PR author trust score is 0-29. feat needs-maintainer-review Contributor trust automation recommends maintainer review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants