Repository navigation
Refresh AI/ML chat presets and migrate saved keys - #1145
hugoaimlapi wants to merge 6 commits into
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
PR Summary by QodoRefresh AI/ML chat presets and migrate saved model keys
AI Description
Merge Risk
|
There was a problem hiding this comment.
🔍 Devin Review: 2 flags
Not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)
[Medium impact] The changes since the previous review appear safe to merge. SummaryThe PR refreshes AI/ML presets and moves saved Sonnet 4.6 selections to the current key.
Reviews (2) · Last reviewed commit: "Shorten the AI/ML migration test name" · Reviewed by Greptile |
Code Review by Qodo
1.
|
There was a problem hiding this comment.
✅ No new issues found.
Approach: sound — it fixes the data (dead/renamed gateway IDs) and carries saved selections across the key rename, rather than layering a compatibility shim over bad preset IDs.
Reviewed changes — full diff at b2657bd (7 files, 5 commits).
- AI/ML preset refresh:
aimlApiModelKeysgoes from 16 to 25 entries, adding GPT-6 Astra/Luna, Claude Fable 5.1 / Opus 5.5 / Sonnet 5.5 / Haiku 5.5, Gemini 4 Argon, Gemini 3.8 Flash, and Kimi K3, plus corrected IDs for Sonnet 4.6, Gemini 3.1 Pro, and Kimi K2.5. - Label normalization: every AI/ML preset
descmoves fromAIML (…)toAI/ML (…), with the 25 labels registered in the English source locale. - Saved-key migration: the dated
aiml_claude_sonnet_4_6_20260218key is added toLEGACY_MODEL_KEY_MIGRATIONSand the canonical key kept in the group-override map, somodelName,apiMode,customApiModes,activeApiModes,knownApiModeDefaultIds, session history, and imported configs all canonicalize. - Provider declaration: the built-in
aimlprovider no longer declares a Completions path; a regression test pins chat-only resolution. - Tests: predicate/label guard, end-to-end saved-config migration, and provider endpoint coverage.
I cross-checked the load-bearing claims rather than trusting the body. All 25 preset values resolve under openai/chat-completions in the live api.aimlapi.com/v1/models catalog; the two changed existing IDs are correct canonical IDs (the previous Gemini string was an alias and the previous Kimi string does not exist), and the catalog lists no openai/completions type at all, so dropping that declaration reflects reality. I also simulated an upgrade from a stored dated-Sonnet config: the picker keeps exactly one Sonnet 4.6 row, the selection survives, and the request resolves to https://api.aimlapi.com/v1/chat/completions with the stored aiml secret. The three touched unit suites pass (202 tests), and Prettier/ESLint are clean on the changed files. Full npm test and the production builds were not re-run here; the PR reports both green.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
🟡 Changes recommended
The migration misses saved custom-mode keys with suffixes, causing affected entries to become unresolvable and be dropped when legacy activeApiModes are materialized and persisted.
1 open issue
What changed in this PR
Refreshes the extension’s existing AI/ML integration with updated chat presets and migration of saved Claude Sonnet 4.6 selections, following the split from #1132.
Changes:
- Adds nine chat presets, updates gateway model IDs, and standardizes English labels to “AI/ML.”
- Adds the canonical Sonnet 4.6 key and migration coverage for saved selections and API modes.
- Removes the built-in provider’s legacy Completions endpoint declaration and tests Chat Completions resolution.
| File | Description |
|---|---|
| tests/unit/services/apis/provider-registry.test.mjs | Tests AI/ML endpoint declarations and chat request resolution. |
| tests/unit/config/migrate-user-config.test.mjs | Tests persistence and routing of migrated Sonnet selections. |
| tests/unit/config/config-predicates.test.mjs | Updates model recognition cases and checks AI/ML labels. |
| src/services/apis/provider-registry.mjs | Removes the legacy Completions path. |
| src/config/model-key-migrations.mjs | Maps dated Sonnet keys to the canonical preset. |
| src/config/index.mjs | Expands presets and refreshes model IDs and labels. |
| src/_locales/en/main.json | Registers the AI/ML labels in the English source locale. |
Review effort: Balanced
| aiml_claude_3_7_sonnet_20250219: 'aiml_claude_sonnet_4_6_20260218', | ||
| aiml_anthropic_claude_sonnet_4: 'aiml_claude_sonnet_4_6', | ||
| aiml_claude_3_7_sonnet_20250219: 'aiml_claude_sonnet_4_6', | ||
| aiml_claude_sonnet_4_6_20260218: 'aiml_claude_sonnet_4_6', |


Follow-up to #1132 and the request to split the changes.
Changes
moonshot/kimi-k3for Chat Completions.Validation
npm test(1,125 passed),npm run lint,npm run pretty:check, and production builds for Chromium and Firefox.Rollback
The migration persists the canonical Sonnet key. A build that predates this change only recognizes the dated key in saved selections.
Original implementation in #1132 by @vito-bush and Stan.
Summary by CodeRabbit