Skip to content

Conversation

@seratch
Copy link
Member

@seratch seratch commented Oct 23, 2025

This pull request resolves #1942 and the new behavior aligns with TS SDK. I think this is a kind of behavioral bug for most use cases, so I've switched the default behavior to this new one by default. If a developer wants to switch back to the current behavior, they can customize this way. That said, I cannot think of those use cases:

runner_config = RealtimeRunConfig(async_tool_calls=False)
runner = RealtimeRunner(agent, config=runner_config)


self._guardrail_tasks: set[asyncio.Task[Any]] = set()
self._tool_call_tasks: set[asyncio.Task[Any]] = set()
self._async_tool_calls: bool = bool(self._run_config.get("async_tool_calls", True))
Copy link
Member Author

Choose a reason for hiding this comment

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

As I mentioned in the PR description, the default value is true. If we'd like to make this opt-in, we can change this part for it, and switch the default behavior to true in future minor/major versions. But I personally think setting true should be beneficial for everyone.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Collaborator

@rm-openai rm-openai left a comment

Choose a reason for hiding this comment

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

codex seems right

@seratch seratch force-pushed the issue-1942-async-function-calls branch from ffd4c09 to 8f37010 Compare October 23, 2025 22:58
@seratch seratch merged commit 8c4d4d0 into main Oct 23, 2025
8 checks passed
@seratch seratch deleted the issue-1942-async-function-calls branch October 23, 2025 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable asynchronous function calling for Realtime session

2 participants