Models: keep Moonshot CN baseUrl from config in merge mode#32722
Models: keep Moonshot CN baseUrl from config in merge mode#32722liuxiaopai-ai wants to merge 3 commits intoopenclaw:mainfrom
Conversation
|
🤖 We're reviewing this PR with Aisle We're running a security check on the changes in this PR now. This usually takes a few minutes. ⌛ Progress:
Latest run failed. Keeping previous successful results. Trace ID: Last updated on: 2026-03-03T07:43:04Z Latest run failed. Keeping previous successful results. Trace ID: Last updated on: 2026-03-03T08:38:15Z Latest run failed. Keeping previous successful results. Trace ID: Last updated on: 2026-03-03T08:58:23Z |
Greptile SummaryThis PR fixes a real bug in Key changes:
Notable concern:
Confidence Score: 4/5
Last reviewed commit: 68e6762 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1e99c9b4c6
ℹ️ 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".
Summary
models.mode=merge, an existing~/.openclaw/agents/*/models.jsonMoonshotbaseUrlcould override a newer explicit configmodels.providers.moonshot.baseUrl.https://api.moonshot.cn/v1) could still end up with stale.aiendpoint in regeneratedmodels.json, causing auth failures.moonshotwhen present, while preserving previous merge behavior for other providers.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
models.mode: merge, explicitmodels.providers.moonshot.baseUrlfrom config now wins over stalemodels.jsonMoonshot baseUrl.Security Impact (required)
No)No)No)No)No)Yes, explain risk + mitigation:Repro + Verification
Environment
models.providers.moonshot.baseUrl = https://api.moonshot.cn/v1Steps
models.jsonwith Moonshot baseUrlhttps://api.moonshot.ai/v1.models.providers.moonshot.baseUrltohttps://api.moonshot.cn/v1and run models generation (ensureOpenClawModelsJson).models.json.Expected
https://api.moonshot.cn/v1.Actual
Evidence
Human Verification (required)
What you personally verified (not just CI), and how:
pnpm test src/agents/models-config.fills-missing-provider-apikey-from-env-var.test.tspnpm test src/commands/auth-choice.moonshot.test.tsCompatibility / Migration
Yes)No)No)Failure Recovery (if this breaks)
src/agents/models-config.tssrc/agents/models-config.fills-missing-provider-apikey-from-env-var.test.tsmodels.jsonvalueRisks and Mitigations