Skip to content

Toolset.create#1584

Open
toubatbrian wants to merge 9 commits into
brian/toolsetfrom
brian/toolsets-create
Open

Toolset.create#1584
toubatbrian wants to merge 9 commits into
brian/toolsetfrom
brian/toolsets-create

Conversation

@toubatbrian
Copy link
Copy Markdown
Contributor

No description provided.

toubatbrian and others added 8 commits May 18, 2026 00:58
Brings the public tool surface in line with `livekit-agents` Python:
- Tool gains an `id: string` field on the base interface. `FunctionTool.id`
  mirrors `name`; for `ProviderTool` it's the provider tool id. `ToolContext`
  keys and equality use `tool.id` consistently
  (matches Python's `_fnc_tools_map[tool.info.name]`).
- `ProviderDefinedTool` → `ProviderTool`, converted from an interface to
  an `abstract class`. Plugins now subclass it
  (`class WebSearch extends ProviderTool { ... }`) to attach
  provider-specific fields and serializers, mirroring Python's
  `OpenAITool(ProviderTool, ABC)` / `WebSearch(OpenAITool)` chain.
  The unused `config: Record<string, unknown>` field is dropped, and the
  `tool({ id })` factory overload is removed — bare instantiation of the
  abstract base is now a compile error.
- `ToolType` literal `'provider-defined'` → `'provider'`.
- `Toolset` now carries a `TOOLSET_SYMBOL` marker; added `isToolset()`
  guard alongside `isFunctionTool` / `isProviderTool`. Replaced the one
  remaining `instanceof Toolset` check in `agent_activity` for
  cross-realm safety (consistent with how the other tool kinds are
  detected).
- Plugin TODO comments in google / mistralai / openai / phonic updated
  from "provider-defined tools" → "provider tools".
Tests, types, and changeset updated. All 312 LLM tests pass and the 31
publishable packages build clean.
Co-authored-by: u9g <jason.lernerman@livekit.io>
Co-authored-by: rosetta-livekit-bot[bot] <282703043+rosetta-livekit-bot[bot]@users.noreply.github.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 22, 2026

⚠️ No Changeset found

Latest commit: 15eb5ba

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

Base automatically changed from brian/provider-tool-base to brian/agent-v2 May 28, 2026 21:45
Base automatically changed from brian/agent-v2 to brian/toolset May 28, 2026 21:46
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