Commit Graph

7 Commits

Author SHA1 Message Date
Owen Lin
456cbae4ac fix type representation in core 2026-02-03 14:42:46 -08:00
Owen Lin
806e490285 update 2026-02-03 08:44:52 -08:00
Aaron Levine
95cd861224 refactor 2026-02-02 16:30:18 -08:00
Aaron Levine
86dc7d0ccb Feedback: dynamic tool result enum 2026-02-02 15:58:30 -08:00
Aaron Levine
35d08c0fdc Feedback 2026-02-02 13:50:52 -08:00
Aaron Levine
6412cfd024 dynamic tool call response can include content_items 2026-02-02 10:38:19 -08:00
jif-oai
d594693d1a feat: dynamic tools injection (#9539)
## Summary
Add dynamic tool injection to thread startup in API v2, wire dynamic
tool calls through the app server to clients, and plumb responses back
into the model tool pipeline.

### Flow (high level)
- Thread start injects `dynamic_tools` into the model tool list for that
thread (validation is done here).
- When the model emits a tool call for one of those names, core raises a
`DynamicToolCallRequest` event.
- The app server forwards it to the client as `item/tool/call`, waits
for the client’s response, then submits a `DynamicToolResponse` back to
core.
- Core turns that into a `function_call_output` in the next model
request so the model can continue.

### What changed
- Added dynamic tool specs to v2 thread start params and protocol types;
introduced `item/tool/call` (request/response) for dynamic tool
execution.
- Core now registers dynamic tool specs at request time and routes those
calls via a new dynamic tool handler.
- App server validates tool names/schemas, forwards dynamic tool call
requests to clients, and publishes tool outputs back into the session.
- Integration tests
2026-01-26 10:06:44 +00:00