ai: OpenAI and Codex forced tool calls (#6588)

* feat(ai): support forced OpenAI Codex tool calls

* feat(ai): support OpenAI Responses tool choice
This commit is contained in:
Alexey Zaytsev
2026-07-13 04:48:33 -03:00
committed by GitHub
parent 16a3d420ff
commit eacaa130ab
5 changed files with 114 additions and 2 deletions
+2
View File
@@ -6,6 +6,8 @@
- Added cache-friendly dynamic tool loading. `ToolResultMessage.addedToolNames` marks where tools from `Context.tools` became available; Anthropic and OpenAI Responses use native deferred loading so late tools stay out of the cached prefix, while other providers continue using `Context.tools` normally ([#6474](https://github.com/earendil-works/pi-mono/pull/6474)).
- Added native `xhigh` and `max` thinking levels for Claude Fable 5 across all generated provider catalogs ([#6490](https://github.com/earendil-works/pi-mono/pull/6490) by [@davidbrai](https://github.com/davidbrai)).
- Added `toolChoice` support to OpenAI Codex Responses, including `"required"` to force a tool call.
- Added `toolChoice` support to OpenAI Responses, including required and named tool selection.
### Fixed