Skip to content

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

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

fix(config): refresh regional model presets#303
octo-patch wants to merge 1 commit 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

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