Skip to content

fix: correct \ URL to mimo.xiaomi.com in config#1505

Open
Ivaloz wants to merge 1 commit into
XiaomiMiMo:mainfrom
Ivaloz:fix/1369-schema-url-v2
Open

fix: correct \ URL to mimo.xiaomi.com in config#1505
Ivaloz wants to merge 1 commit into
XiaomiMiMo:mainfrom
Ivaloz:fix/1369-schema-url-v2

Conversation

@Ivaloz

@Ivaloz Ivaloz commented Jul 1, 2026

Copy link
Copy Markdown

Summary

The \\ field in generated config files was pointing to \https://opencode.ai/config.json\ which is incorrect for MiMo Code. This caused custom provider configurations created via /connect\ to not work properly.

Update all occurrences to use the correct URL: \https://mimo.xiaomi.com/mimocode/config.json\

Changes

  • \packages/opencode/src/config/config.ts: Fixed 4 instances of incorrect schema URL

Test Plan

  1. Run /connect\ command and create a custom provider
  2. Check generated \mimocode.jsonc\ file
  3. Verify \\ points to \https://mimo.xiaomi.com/mimocode/config.json\
  4. Verify custom provider configuration works correctly

Fixes #1369

The \ field was pointing to opencode.ai/config.json which is
incorrect for MiMo Code. Update all occurrences to use the correct
URL: https://mimo.xiaomi.com/mimocode/config.json

Fixes XiaomiMiMo#1369
@Ivaloz

Ivaloz commented Jul 1, 2026

Copy link
Copy Markdown
Author

简短说明

将配置中默认的 $schema URL 从 https://opencode.ai/config.json 修正为 https://mimo.xiaomi.com/mimocode/config.json,以适配 MiMo Code 场景,修复通过 /connect 生成的自定义 provider 配置无法生效的问题。

为何修改

生成的配置文件里 $schema 指向错误的域名,导致某些配置被误导或无法按 MiMo 的约定解析。本 PR 将所有相关硬编码替换为 MiMo 官方 schema 地址。

如何验证
检出本 PR 分支: gh pr checkout 1505 --repo XiaomiMiMo/MiMo-Code
安装与构建(若仓库使用 pnpm): pnpm install pnpm -w build
运行 connect 流程并创建 custom provider(按交互完成): pnpm --filter packages/opencode run connect
定位并检查生成的配置文件(mimocode.jsonc / config.json): jq -r '."$schema" // "no $schema"' path/to/mimocode.jsonc 期望值: https://mimo.xiaomi.com/mimocode/config.json
在仓库中确认无残留旧 URL: rg "opencode.ai/config.json" || grep -R --line-number "opencode.ai/config.json" .

影响与风险

影响面:配置生成/解析流程。
风险:低(仅替换硬编码常量)。建议合并前做上面验证并搜索残留引用。

回滚/后续

若需回退:回退该提交即可恢复旧行为。
可选后续:若发现仓库其他位置仍用旧 URL,建议一并更新 docs/examples 并在代码旁加一条注释说明该 URL 的用途。

==================================================

Short summary

Update the default $schema URL from https://opencode.ai/config.jsonhttps://mimo.xiaomi.com/mimocode/config.json so generated configs in MiMo Code workflows point to the correct schema; this fixes custom provider configs created via the /connect flow.

Why

The generated config file previously referenced the wrong domain, which could cause configs to be interpreted incorrectly for MiMo. This PR replaces the hard-coded schema URL with the correct MiMo schema endpoint.

How to verify locally

Check out this PR branch: gh pr checkout 1505 --repo XiaomiMiMo/MiMo-Code
Install & build (example with pnpm): pnpm install pnpm -w build
Run the connect flow and create a custom provider (follow the interactive prompts): pnpm --filter packages/opencode run connect
Locate and inspect the generated config (mimocode.jsonc / config.json): jq -r '."$schema" // "no $schema"' path/to/mimocode.jsonc Expected: https://mimo.xiaomi.com/mimocode/config.json
Confirm no leftover references to the old URL: rg "opencode.ai/config.json" || grep -R --line-number "opencode.ai/config.json" .

Impact & risk

Impact: config generation / parsing flows.
Risk: Low (simple string substitution). Recommend running the above verification and searching the repo for remaining occurrences before merging.

Rollback / follow-up

Rollback: revert this commit to restore previous value.
Follow-up: if other files/docs still refer to the old URL, consider updating them in the same or a follow-up PR and add a short code comment explaining the schema URL purpose.

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.

/connect 创建 custom provider 后,mimocode.jsonc 中 $schema 指向错误地址

1 participant