Skip to content

Commit 081d48c

Browse files
AjayKumbhamseratch
andauthored
Update .changeset/fix-session-config-tool-registration.md
Co-authored-by: Kazuhiro Sera <[email protected]>
1 parent 98df59d commit 081d48c

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

.changeset/fix-session-config-tool-registration.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,3 @@
33
---
44

55
Fix session config breaking tool registration
6-
7-
When initializing a RealtimeSession with any config object, tool registration was being broken because empty or undefined tools arrays were being sent to the OpenAI API, which disabled tool calls. This fix ensures that the tools field is only included in session updates when tools are actually present, preventing the API from disabling tool functionality when session configuration is provided.
8-
9-
The issue occurred because the `_getMergedSessionConfig` method would include `tools: undefined` in the session data when no tools were explicitly provided in the config, which the OpenAI API interpreted as a request to disable all tools. Now, the tools field is only included when tools are actually available and non-empty.
10-
11-
This allows users to customize audio settings (voice, turn detection, noise reduction, etc.) while maintaining tool functionality, resolving the mutual exclusivity between session configuration and tool registration.

0 commit comments

Comments
 (0)