Repository navigation
refactor(lm)!: remove orphaned ChatMessageWithTools and ApplyChatTemplateOptions types - #238
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
…lateOptions types Co-Authored-By: Brooklyn <[email protected]>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Closing in favor of one combined dead-code cleanup PR (requested by the maintainer). The new PR will include this branch's changes. |
Summary
Deletes two orphaned interfaces from
packages/lm/src/tools/types.ts:ChatMessageWithToolsandApplyChatTemplateOptions. Both came in with the originalchat()API (#3).ChatSession(#48) replaced that API, and since then nothing in the repo has used either type. They were still exported only because of theexport * from './tools/index.js'barrel in@mlx-node/lm. They describe a chat-template call shape (addGenerationPrompt,enableThinking) that no current API accepts.ChatRole,ToolCallandToolDefinitionare kept.@mlx-node/trlstill usesChatRole.Checks: I grepped
packages/,__test__/,examples/,evals/,scripts/,docs/andcrates/and found no references.tsc -b(yarn typecheck) passes.vp lint --type-awareexits 0, with only the warnings already onmain.Release notes
Breaking (type-only):
@mlx-node/lmno longer exports theChatMessageWithToolsandApplyChatTemplateOptionstypes. They belonged to the retiredchat()API, and no current API accepts them. Use theChatSessionAPI and the nativeChatMessagetypes from@mlx-node/coreinstead. There is no runtime change.Resolves code-scan finding
sfind-55975763f4ad44c3a2eda7a6564e9ac1.Link to Devin session: https://app.devin.ai/sessions/466d40b0ffff4fc4a4dd63a253ab7e0e
Open in Devin Desktop: https://app.devin.ai/desktop/session/466d40b0ffff4fc4a4dd63a253ab7e0e?variant=devin
Requested by: @Brooooooklyn