Skip to content

Make Message, ToolSpec, additionalContext sendable#298

Merged
mattt merged 1 commit intohuggingface:mainfrom
DePasqualeOrg:make-sendable
Dec 10, 2025
Merged

Make Message, ToolSpec, additionalContext sendable#298
mattt merged 1 commit intohuggingface:mainfrom
DePasqualeOrg:make-sendable

Conversation

@DePasqualeOrg
Copy link
Contributor

This will help with concurrency fixes in downstream packages like mlx-swift-lm.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances concurrency safety by making Message, ToolSpec, and additionalContext types Sendable, which enables better concurrency support in downstream packages like mlx-swift-lm.

  • Changed Message and ToolSpec type aliases from [String: Any] to [String: any Sendable]
  • Updated additionalContext parameter type to [String: any Sendable]? across all function signatures

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@mattt mattt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thank you, @DePasqualeOrg 🚀

@mattt mattt merged commit 573e5c9 into huggingface:main Dec 10, 2025
8 checks passed
@tpae
Copy link
Contributor

tpae commented Dec 18, 2025

hey @mattt , is this going to be released in a version soon?

@DePasqualeOrg
Copy link
Contributor Author

@mattt, could you make a new release so that this gets picked up in downstream packages? Thanks.

See ml-explore/mlx-swift-lm#14 (comment)

@pcuenca
Copy link
Member

pcuenca commented Dec 18, 2025

Doing a release now.

@pcuenca
Copy link
Member

pcuenca commented Dec 18, 2025

https://github.com/huggingface/swift-transformers/releases/tag/1.1.6

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.

5 participants