mirror of
https://github.com/openai/codex.git
synced 2026-10-19 16:17:49 +00:00
Add opt-in retention for turn tool outputs (#52686)
## What changed Add an optional `retain` flag to `TurnToolOutput` for `turn/start`. When set to `true`, pass the output to the core with a retention annotation to request retention in the thread's model history. The flag defaults to `false`, preserving existing behavior. Update the generated JSON schemas, TypeScript types, and Python bindings to expose the flag. ## Testing Add an integration test verifying that a retained tool output reaches the model and preserves client-authored sender metadata in persisted history, including the receiver message ID. GitOrigin-RevId: 52893a8fcb308f26e77ba8f0bee9990073b26d54
This commit is contained in:
@@ -11832,6 +11832,10 @@ class TurnToolOutput(BaseModel):
|
||||
name: str
|
||||
namespace: str | None = None
|
||||
output: FunctionCallOutputBody
|
||||
retain: Annotated[
|
||||
bool | None,
|
||||
Field(description="Requests retention of this output in the thread's model history."),
|
||||
] = None
|
||||
|
||||
|
||||
class TurnsPage(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user