Skip to content

fix(kimi): normalize legacy model IDs before runtime loads - #146261

Merged
steipete merged 1 commit into
mainfrom
codex/kimi-static-model-aliases-final-20260912-v1
Sep 12, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/kimi-static-model-aliases-final-20260912-v1

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Related: #130706, #146183.

What Problem This Solves

Fixes an issue where documented Kimi Coding aliases fail as unknown models on cold TTS summary selection, even though the canonical model and the loaded provider's normalization hook work. The affected aliases are kimi-code, k2p5, and k3[1m].

Why This Change Was Made

The plugin now declares those aliases in its existing static manifest contract, and its public runtime helper reads the same map. Cold catalog reads and loaded-provider normalization therefore share one policy. Existing hooks, provider IDs, public exports, and the helper's case/whitespace behavior are preserved.

The manifest and helper together add seven production lines while removing the duplicated alias policy and an obsolete type assertion. The only assertion-baseline change removes that helper's existing allowance.

User Impact

Existing documented aliases select kimi-for-coding or k3 before the provider runtime loads. Canonical IDs and explicit summary overrides continue to work; disabled, denied, unlisted, and unknown models remain rejected.

Evidence

  • All three aliases failed static parsing on the original source baseline. After the separately landed cold-catalog fix fix(tts): resolve bundled summary models on cold starts #146183, the same three aliases still failed before HTTP on its frozen compiled build; canonical controls passed.
  • On 1eb087b4fd97cd65b84a325676870b768c76e9b7, 37 focused tests and the full changed-file gate passed. Independent P2 review is scoped-clean; the final main carry has the identical reviewed patch, production/test postimages, and relevant owner inputs.
  • The existing Moonshot/Kimi documentation already specifies these aliases; this repairs that contract without new configuration or stored formats.
  • A single normal pnpm build passed on that final head. Its compiled public speech/summary path passed eleven fresh processes: six completed model-specific summaries (including all three legacy aliases) and five pre-HTTP policy/unknown-model rejections. All children exited naturally; 13,188 build files and observed module hashes remained unchanged.
  • The compiled fixture uses a public transport-host seam and delegates redirected HTTP to the original guarded fetch builder. The OS sandbox allows loopback only, with a non-loopback denial control in every child. This proves compiled selection/auth/SSE boundaries, not hosted Kimi inference or native-endpoint guarding. Earlier fixture failures remain documented in fix(tts): resolve bundled summary models on cold starts #146183, including its synthetic-only HTTP 401; they are not counted as successful proof.

Declare the documented kimi-code, k2p5, and k3[1m] aliases before provider runtime loads. Read the same manifest map from the existing public helper so cold model selection and runtime normalization share one policy.

Preserve registered hooks and public exports, and remove the obsolete type-assertion allowance. Static parser regressions fail for all three legacy IDs on the baseline and retain canonical model controls.

Related: #130706
Prerequisite: #146183
@clawsweeper

clawsweeper Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review September 12, 2026 17:42
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 12, 2026
@clawsweeper

clawsweeper Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 12, 2026, 1:50 PM ET / 17:50 UTC.

ClawSweeper review

What this changes

The Kimi plugin declares three legacy model aliases in its static manifest, shares that map with runtime normalization, and adds cold-parser regression coverage.

Merge readiness

✅ Ready for maintainer review

This remains a useful, focused repair: current main still lacks cold-start alias normalization, and the merged prerequisite explicitly leaves that work outstanding. No introduced correctness or security defect was found.

Priority: P2
Reviewed head: 1eb087b4fd97cd65b84a325676870b768c76e9b7

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair that reuses the established owner and adds meaningful cold-parser regression coverage, with no blocking finding.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored PR is exempt from the external-contributor proof gate. Its captured body additionally reports compiled speech-summary coverage for all aliases and rejection controls through loopback transport, explicitly excluding hosted Kimi inference.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored PR is exempt from the external-contributor proof gate. Its captured body additionally reports compiled speech-summary coverage for all aliases and rejection controls through loopback transport, explicitly excluding hosted Kimi inference.
Evidence reviewed 7 items Introduced patch and shared policy: The verified merge-base-to-head diff adds only the three manifest aliases, makes the existing helper consume them, extends parser tests, and removes one obsolete assertion allowance. Public exports and registration hooks remain intact.
Existing documented contracts: The provider documentation specifies all three legacy aliases. The manifest documentation expressly assigns pre-runtime model alias cleanup to modelIdNormalization; this patch uses that existing contract without adding an API.
Actual cold-selection boundary: Speech summarization selects against captured plugin metadata before model materialization. The shared parser applies manifest aliases even when runtime plugin normalization is disabled; the new tests exercise exactly that distinction for three aliases and three canonical controls.
Findings None None.
Security None None.

How this fits together

OpenClaw resolves the configured model before loading its provider runtime. Kimi’s manifest supplies early alias normalization so speech summarization can select the canonical model and proceed through existing authentication and completion handling.

flowchart LR
  A[Configured summary model] --> B[Captured plugin metadata]
  B --> C[Kimi alias normalization]
  C --> D[Canonical catalog model]
  D --> E[Existing policy and authentication checks]
  E --> F[Summary completion]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +7, Tests +11, Other -1. Total +17 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 2 16 9 +7
Tests 1 20 9 +11
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 1 -1
Total 4 36 19 +17

Review metrics

Metric Value Why it matters
Alias compatibility 3 existing aliases; 0 new configuration options The repair restores documented inputs through an existing manifest contract without introducing a new user setting.

Technical review

Best possible solution:

Keep the plugin manifest as the single alias policy consumed by cold selection and the existing runtime helper.

Do we have a high-confidence way to reproduce the issue?

Yes, source establishes the path: select a documented Kimi alias before runtime loading, when main has no manifest alias mapping. Tests and builds were not executed during this read-only review.

Is this the best way to solve the issue?

Yes. Reusing the existing static manifest contract repairs early selection while preserving the helper’s public signature, exact-match behavior, canonical IDs, and existing configuration.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 486b1fc315f5.

Labels

Label changes:

  • add P2: This repairs a bounded model-selection failure affecting legacy Kimi aliases during cold speech summarization.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored PR is exempt from the external-contributor proof gate. Its captured body additionally reports compiled speech-summary coverage for all aliases and rejection controls through loopback transport, explicitly excluding hosted Kimi inference.

Label justifications:

  • P2: This repairs a bounded model-selection failure affecting legacy Kimi aliases during cold speech summarization.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored PR is exempt from the external-contributor proof gate. Its captured body additionally reports compiled speech-summary coverage for all aliases and rejection controls through loopback transport, explicitly excluding hosted Kimi inference.

Evidence

What I checked:

  • Introduced patch and shared policy: The verified merge-base-to-head diff adds only the three manifest aliases, makes the existing helper consume them, extends parser tests, and removes one obsolete assertion allowance. Public exports and registration hooks remain intact. (extensions/kimi-coding/provider-catalog.ts:8, 1eb087b4fd97)
  • Existing documented contracts: The provider documentation specifies all three legacy aliases. The manifest documentation expressly assigns pre-runtime model alias cleanup to modelIdNormalization; this patch uses that existing contract without adding an API. Public docs: docs/providers/moonshot.md. (docs/providers/moonshot.md:190, 1eb087b4fd97)
  • Actual cold-selection boundary: Speech summarization selects against captured plugin metadata before model materialization. The shared parser applies manifest aliases even when runtime plugin normalization is disabled; the new tests exercise exactly that distinction for three aliases and three canonical controls. (extensions/kimi-coding/provider-catalog.test.ts:79, 1eb087b4fd97)
  • Still absent from reviewed main: Fetched main retains runtime-only alias handling and has no Kimi modelIdNormalization manifest entry. Inspection of v2026.9.4 likewise shows the old helper and missing manifest entry, so the static repair is not already supplied by that release. (extensions/kimi-coding/provider-catalog.ts:21, 486b1fc315f5)
  • Merged prerequisite leaves distinct work: GitHub confirms fix(tts): resolve bundled summary models on cold starts #146183 merged. Its body explicitly states that all three legacy aliases still fail independently and remain a separate follow-up; canonical cold-catalog availability does not supersede this repair. (92565ebfce49)
  • Captured behavior evidence: The supplied complete PR body reports eleven fresh compiled processes at the reviewed head: six successful summaries covering all aliases and canonical controls, plus five pre-HTTP rejection controls. It explicitly limits the proof to compiled selection/auth/SSE through guarded loopback transport, excludes hosted inference, and preserves earlier failed attempts separately. These are contributor-reported observations, not executions performed by this review. (1eb087b4fd97)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • NianJiu: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 8554267 into main Sep 12, 2026
163 checks passed
@steipete
steipete deleted the codex/kimi-static-model-aliases-final-20260912-v1 branch September 12, 2026 18:00
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 13, 2026
…w#146261)

Declare the documented kimi-code, k2p5, and k3[1m] aliases before provider runtime loads. Read the same manifest map from the existing public helper so cold model selection and runtime normalization share one policy.

Preserve registered hooks and public exports, and remove the obsolete type-assertion allowance. Static parser regressions fail for all three legacy IDs on the baseline and retain canonical model controls.

Related: openclaw#130706
Prerequisite: openclaw#146183
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: kimi-coding maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant