Skip to content

refactor(lm)!: remove orphaned ChatMessageWithTools and ApplyChatTemplateOptions types - #238

Closed
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1792073118-remove-orphaned-chat-template-types
Closed

devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1792073118-remove-orphaned-chat-template-types

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

Deletes two orphaned interfaces from packages/lm/src/tools/types.ts: ChatMessageWithTools and ApplyChatTemplateOptions. Both came in with the original chat() 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 the export * from './tools/index.js' barrel in @mlx-node/lm. They describe a chat-template call shape (addGenerationPrompt, enableThinking) that no current API accepts.

ChatRole, ToolCall and ToolDefinition are kept. @mlx-node/trl still uses ChatRole.

Checks: I grepped packages/, __test__/, examples/, evals/, scripts/, docs/ and crates/ and found no references. tsc -b (yarn typecheck) passes. vp lint --type-aware exits 0, with only the warnings already on main.

Release notes

Breaking (type-only): @mlx-node/lm no longer exports the ChatMessageWithTools and ApplyChatTemplateOptions types. They belonged to the retired chat() API, and no current API accepts them. Use the ChatSession API and the native ChatMessage types from @mlx-node/core instead. 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

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@coderabbitai

coderabbitai Bot commented Oct 15, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: eab95eaf-598e-42bf-a8b2-eedf9fd04a7c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

Closing in favor of one combined dead-code cleanup PR (requested by the maintainer). The new PR will include this branch's changes.

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.

1 participant