Repository navigation
fix(kimi): normalize legacy model IDs before runtime loads - #146261
Conversation
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
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 12, 2026, 1:50 PM ET / 17:50 UTC. ClawSweeper reviewWhat this changesThe 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 Review scores
Verification
How this fits togetherOpenClaw 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]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +7, Tests +11, Other -1. Total +17 across 4 files. View PR surface stats
Review metrics
Technical reviewBest 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. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
…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
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, andk3[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-codingork3before the provider runtime loads. Canonical IDs and explicit summary overrides continue to work; disabled, denied, unlisted, and unknown models remain rejected.Evidence
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.pnpm buildpassed 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.