Skip to content

feat(boson): Turn on Boson's built-in web search and release 0.2.2 - #77

Merged
austinchennn merged 2 commits into
mainfrom
feat/boson-web-search
Oct 24, 2026
Merged

austinchennn merged 2 commits into
mainfrom
feat/boson-web-search

Conversation

@austinchennn

Copy link
Copy Markdown
Collaborator

Description:

Fixes #xxx:

No linked issue. Boson never searched the web because vRT sent every tool as type: "function", so Boson's built-in { "type": "web_search" } never reached it.

Behaviours Completed:

  • boson({ webSearch: true | { allowedDomains | excludedDomains, country } }) offers Boson's built-in web search, with tool_choice: "auto", on connect (even with no app tools) and on every tool update.
  • Calls Boson runs itself (executor: "server") no longer reach the runtime as tool calls: nothing answers them with function_call_output or an extra response.create, as Boson's docs require.
  • A response whose only call is server-run ends as completed, not tool_calls (which the runtime reported as "tool_calls without tool calls").
  • Server-run calls surface as server_tool.call (with arguments) and server_tool.result extension events for logging.
  • web_search is reserved: connecting with an app tool of that name fails; a later tool update leaves it out and reports a recoverable invalid_request.
  • Options Boson would reject (more than 5 domains, non-hostnames, both domain lists, non-ISO country) throw when the model is created.
  • Every package moves to 0.2.2.

Files Changed:

  • packages/openai-compatible/src/index.ts: builtinTools option, server-executed call tracking, stop reason, reserved names.
  • packages/boson/src/index.ts: webSearch option and bosonWebSearchTool().
  • packages/boson/test/boson.test.ts: adapter tests and a runtime test through startSession.
  • website/src/content/docs/guides/models.md: Boson web search section.
  • package.json of every package and example, package-lock.json: version 0.2.2.

Brief Explanation:

The OpenAI-compatible base gains builtinTools, provider tools sent as-is after the app's function tools. A function_call item marked executor: "server" (or named after a built-in, if a provider omits the mark) is remembered by call id. Its argument events become a server_tool.call extension event instead of tool.call, and its function_call_output (added by Boson) becomes server_tool.result. Core is unchanged: the turn ends after the preamble, and Boson's own follow-up response starts a new turn as any provider-initiated response does.

Testing:

  • npm run check:spec, npm run typecheck, npm test (597 tests), npm run test:e2e, npm run pack, npm run check:budgets, npm run test:consumer: all pass locally.
  • New tests replay the event sequence from Boson's tool guide: no tool.call, nothing sent back, both responses completed, and through the real runtime exactly one response.create, no function_call_output, both spoken replies in the transcript.

Unsure About:

  • The event sequence comes from Boson's docs; it has not been run against live Boson (no key here).
  • webSearch is off by default, so other Boson users of vRT see no change. Turning it on by default is a one-line change if preferred.

boson({ webSearch }) sends { type: "web_search" } next to the app's function
tools, with tool_choice "auto", on connect and on every tool update. Calls Boson
runs itself (executor "server") no longer reach the runtime as tool calls, so
nothing answers them with a function_call_output or an extra response.create;
they surface as server_tool.call / server_tool.result extension events, and a
response that only made such a call ends as completed instead of tool_calls.
An app tool named web_search is refused while the built-in is on.

All packages move to 0.2.2.
@austinchennn
austinchennn merged commit 2cd972e into main Oct 24, 2026
7 checks passed
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