Skip to content

fix(config): refresh regional model presets - #303

Open
octo-patch wants to merge 3 commits into
OpenCoworkAI:mainfrom
octo-patch:octo/20260709-refresh-model-parameters-recvoSoyhDJvIP
Open

fix(config): refresh regional model presets#303
octo-patch wants to merge 3 commits into
OpenCoworkAI:mainfrom
octo-patch:octo/20260709-refresh-model-parameters-recvoSoyhDJvIP

Conversation

@octo-patch

Copy link
Copy Markdown

Summary

  • Replace the stale custom setup with selectable global and China endpoints for both supported compatible protocols.
  • Add the current model choices and runtime metadata for context, reasoning, supported inputs, and token pricing.
  • Add coverage for endpoint detection and request-path composition.

Type of change

  • Bug fix (fix)
  • New feature (feat)
  • Refactor / performance (refactor / perf)
  • Documentation (docs)
  • Tests (test)
  • Build / CI (build / ci)
  • Other

Checklist

  • Code follows the project style (TypeScript strict, ESLint, Prettier)
  • Commit messages follow Conventional Commits (feat:, fix:, etc.)
  • Self-review completed; no debug logs or commented-out code
  • Tests added or updated for the changed behavior
  • Full test suite passes locally; see the environment limitation below
  • npm run lint completes locally
  • UI changes tested on both macOS and Windows
  • New user-facing strings added to both locale files

Testing

  • 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 typecheck
  • npm 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)

@github-actions github-actions 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.

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 a fix(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 KnownSyntheticModelMetadata to 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

@github-actions github-actions 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.

Findings

  • [Minor] zh.json MiniMax 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

@github-actions github-actions 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.

Findings

  • [Minor] Untranslated MiniMax note in the Chinese locale — src/renderer/i18n/locales/zh.json:275 adds a new minimax.note string that is still in English ("Choose the endpoint that matches your account region. Both compatible protocols are supported."). Since GlobalName/ChinaName are 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:139 replaces the old matcher (which used hostContains: ['minimax'] and covered api.minimax.chat) with exact-host matchers for api.minimax.io and api.minimaxi.com only. Existing user configs that still use the previously recommended https://api.minimax.chat/v1 (or any custom host containing minimax) will silently stop being detected as MiniMax. If api.minimax.chat is 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.060.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

@octo-patch

Copy link
Copy Markdown
Author

Updated MiniMax-M3 cache-read pricing to $0.12 per million tokens and synchronized the model-resolution test in commit 060ea70. I ran 48 related Vitest tests, npm run lint, and npm run typecheck; both GitHub checks are passing.

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.

1 participant