fix(config): refresh regional model presets - #303
Conversation
There was a problem hiding this comment.
Review mode: initial
Findings
- [Minor] Localization inconsistency in Chinese locale – The note for MiniMax in
src/renderer/i18n/locales/zh.json(line ~271) is written in English: "Choose the endpoint that matches your account region. Both compatible protocols are supported." The original was in Chinese. Since the PR title states this is afix(config)update affecting user-facing strings, the Chinese locale should be translated appropriately for consistency.
Suggested fix:"note": "请根据您的账户区域选择对应 endpoint。两种兼容协议均支持。"
Summary
- Review mode: initial
- The PR correctly adds selectable regional endpoints for MiniMax (global/China × OpenAI/Anthropic), introduces
KnownSyntheticModelMetadatato supply reasoning, input, cost, and context window for synthetic fallback models, and updates the model presets and locale files accordingly. Tests cover detection, model resolution, API path composition, and state assertions. The implementation is sound and no blockers or major issues were identified. - Review policy: advisory — the check reflects automation health/completion only; it does not approve the PR or resolve findings.
Testing
- Existing tests pass; new tests cover synthetic metadata, region detection, endpoint detection, and Anthropic base URL path composition. The test suite is adequate for the changes. Not run (automation).
Open Cowork Bot
There was a problem hiding this comment.
Findings
- [Minor]
zh.jsonMiniMax note is still untranslated – the new note added for the Chinese locale remains in English: "Choose the endpoint that matches your account region. Both compatible protocols are supported." (src/renderer/i18n/locales/zh.json:275). This was reported in the previous review and is still present on the updated line, so zh users continue to see an English string in an otherwise Chinese settings panel.
Suggested fix:"note": "请根据您的账户区域选择对应 endpoint。两种兼容协议均支持。"
Summary
- Review mode: follow-up after new commits
- The only delta since the previous bot review is the MiniMax-M3 pricing update and its corresponding test assertion. The remaining PR changes are unchanged. No blockers or major issues were introduced; the one prior Minor finding (Chinese locale string) remains open.
- Review policy: advisory — the check reflects automation health/completion only; it does not approve the PR or resolve findings.
Testing
- Added/updated tests cover endpoint detection, model metadata, preset visibility, and Anthropic-compatible base URL path composition; they are consistent with the changed code. Not run (automation).
Open Cowork Bot
There was a problem hiding this comment.
Findings
-
[Minor] Untranslated MiniMax note in the Chinese locale —
src/renderer/i18n/locales/zh.json:275adds a newminimax.notestring that is still in English ("Choose the endpoint that matches your account region. Both compatible protocols are supported."). SinceGlobalName/ChinaNameare localized, this note should be too.
Suggested fix:"note": "请根据您的账户区域选择对应的 endpoint。两种兼容协议均支持。"
-
[Minor] Legacy MiniMax endpoints no longer matched by provider detection —
src/shared/api-provider-guidance.ts:139replaces the oldmatcher(which usedhostContains: ['minimax']and coveredapi.minimax.chat) with exact-host matchers forapi.minimax.ioandapi.minimaxi.comonly. Existing user configs that still use the previously recommendedhttps://api.minimax.chat/v1(or any custom host containingminimax) will silently stop being detected as MiniMax. Ifapi.minimax.chatis intentionally deprecated this is acceptable, but keeping a fallback avoids a silent regression for saved configs.
Suggested fix:// add the legacy host (or keep a hostContains fallback) to the global matchers matcher: { hosts: ['api.minimax.io', 'api.minimax.chat'], pathPrefixes: ['/v1'], },
Summary
Review mode: follow-up after new commits
Since the last bot review, the only diff change is the MiniMax-M3 cacheRead price update (0.06 → 0.12) plus the matching assertion in the model-metadata test. No new Blocker/Major issues were introduced by this delta. One previously reported Minor issue (untranslated Chinese MiniMax note) is still present, and one additional Minor regression risk was identified in the endpoint matcher. All findings above are anchored to currently added/modified lines.
Review policy: advisory — the check reflects automation health/completion only; it does not approve the PR or resolve findings.
Testing
The updated tests cover endpoint/path detection (tests/anthropic-base-url.test.ts), provider guidance setup selection, model metadata, and preset registration. No automated tests were run during this review (automation).
Open Cowork Bot
|
Updated MiniMax-M3 cache-read pricing to $0.12 per million tokens and synchronized the model-resolution test in commit |
Summary
Type of change
fix)feat)refactor/perf)docs)test)build/ci)Checklist
feat:,fix:, etc.)npm run lintcompletes locallyTesting
npx vitest run tests/provider-guidance.test.ts tests/api-config-state.test.ts tests/pi-model-resolution.test.ts tests/anthropic-base-url.test.ts(48 passed)npm run typechecknpm run lint(completed with eight existing warnings)npx vitest run(1,075 passed; the remaining native memory tests require the repository's Node 22 and SQLite native binding, which were unavailable in this local environment)