Added Mimo Support (BETA) & Fix Test Model 404 for base URLs ending in a version segment (e.g. Zhipu GLM /v4)#4084
Added Mimo Support (BETA) & Fix Test Model 404 for base URLs ending in a version segment (e.g. Zhipu GLM /v4)#4084osscv wants to merge 8 commits into
Conversation
Insert a new 'claude-mythos-5' model tuple into src-tauri/src/database/schema.rs. The tuple ("claude-mythos-5", "Claude Mythos 5", "10", "50", "1.00", "12.50") is added to the models list (placed before the Claude 4.8 series) to register the Mythos 5 model with the Database schema.
Integrate a new tool "mimo" (MiMo Code) across Tauri commands and the About UI. Backend: add mimo to VALID_TOOLS, tool display mapping, MIMO_INSTALL_UNIX installer string, npm package (@mimo-ai/cli) and npm install/update handling, include mimo in official update/preference logic, fetch npm latest for version checks, add installer fallback and unit tests for install/update commands. UI: include "mimo" in TOOL_NAMES, display name and icon (ProviderIcon), add posix/npm install snippets, and render the tool icon in the AboutSection list.
Introduce MiMo Code (mimo) as a first-class app: add AppType::Mimo, enable mimo flags across McpApps and SkillApps, include mimo in prompt/config handling and deeplink parsing. Add mimocode_config module to read/write MiMo Code config files and a new mcp/mimo module to import/sync MCP servers with conversion to/from OpenCode format. Expose Tauri commands for importing/getting MiMo live providers and wire MiMo import/sync into app startup. Update database schema and DAOs: bump schema version to 12, add enabled_mimo columns to mcp_servers and skills, and add v11->v12 migration logic. Update various callers and migration code to ensure MiMo entries are created/imported where needed.
|
强烈反对; mimo code 这种套壳 opencode 还一堆bug 的为啥要支持 |
Add ends_with_version_segment helper to detect trailing `/vN` segments (e.g. `/v1`, `/paas/v4`) and update stream URL resolution to use it. This prevents appending an extra `/v1` (which would create paths like `/v4/v1/...` and cause 404s). Also add a unit test for a GLM Coding Plan base URL ending with `/v4` to ensure the resolved endpoint becomes `/v4/chat/completions`.
Add a unit test in src-tauri/src/services/stream_check.rs to verify ends_with_version_segment recognizes any numeric "/v{N}" path segment (e.g. /v1, /v2, /v10) and rejects non-numeric or non-version segments (e.g. /v1beta, /api, root). This ensures version detection handles multi-digit versions and excludes false positives.
Hi @lovingfish 我理解你的立场的思考角度,确实... 如果mimo code 体验上有很多 bug...会让人很难接受but.... 但我觉得CC Switcch 支持 Mimo Code 不一定等于认可所有问题。还是有一部分用户确实需要cc switch 来更简单搞笑的配置 mimo code ,而且 Mimo 官方github 也公开写过他们在使用 OpenCode 基础来构建,所以我不太会直接把它定义成“偷”或者单纯“套壳 OpenCode”。 更合理的看法可能是:可以批评它目前的质量、bug、产品体验,甚至要求他们更透明、更负责任地维护;但如果它满足了一些用户需求,而且使用关系是公开说明的,那我觉得还是可以给它一定支持和改进空间。 |
Show a caution message in ProxyPanel when the listen address is not loopback (not empty, localhost, ::1, or 127.*). This warns that using 0.0.0.0 exposes the router to the LAN and the service has no authentication, advising use only on trusted networks or behind a firewall. Added corresponding localization strings for en, ja, zh-TW, and zh.
|
请拆分pr,并正确填写 pr template,ci 也是红的 |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e675a833aa
ℹ️ 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".
| "codex" => apps.codex = true, | ||
| "gemini" => apps.gemini = true, | ||
| "opencode" => apps.opencode = true, | ||
| "mimo" | "mimocode" | "mimo-code" | "mimo_code" => apps.mimo = true, |
There was a problem hiding this comment.
Merge MiMo flags for existing MCP deeplink imports
When a deeplink imports an MCP server that already exists with apps=mimo, this new alias is accepted here, but the existing-server path in import_mcp_from_deeplink only merges claude, codex, and gemini into merged_apps. The import then reports success while leaving apps.mimo false, so users cannot enable MiMo for an existing MCP server via deeplink unless they edit it manually.
Useful? React with 👍 / 👎.
|
能别拉屎污染社区吗? pr description 不会写, 推上来 ci 都是红,连最基本的 pr 拆分都不会? |

Summary / 概述
Issue 1: #4073
Added Mimo Support (BETA), need further TESTING
Please give feedback, I will fix it.
Issue 2: #4083
The "Test Model" connection check failed with a 404 for providers whose base URL already ends in a version segment, such as Zhipu GLM (https://open.bigmodel.cn/api/coding/paas/v4). The URL resolver assumed every endpoint used /v1 and appended /v1/chat/completions, producing the invalid .../v4/v1/chat/completions. The provider key and base URL were actually correct, so users were misled into thinking their setup was broken.
Root cause
In resolve_claude_stream_url (stream_check.rs), the openai_chat, openai_responses, and Anthropic-default branches only checked base.ends_with("/v1"). Any other version segment (/v4, /v2, etc.) fell through to the branch that force-appends /v1/....
Changes
Added an ends_with_version_segment helper that matches any /v{N} segment (v followed by one or more digits) on the last path segment, ignoring a trailing slash. It excludes non-numeric segments like /v1beta and /api.
Replaced the three base.ends_with("/v1") checks with this helper, so a base URL that already carries a version segment gets the endpoint appended directly (/v4/chat/completions) instead of a redundant /v1.
Added unit tests: a regression test for the Zhipu openai_chat case, plus coverage for the helper across /v1, /v2, /v4, /v10, trailing slash, and the non-version cases.
Impact
Test Model now respects the configured base URL for version-suffixed endpoints, matching the behavior the coding agents already had via LiteLLM. Standard /v1 providers are unaffected.