Commit 2ec2f28
authored
feat: Add Responses memory read path (#6162)
## Summary
- adds `MemoryToolConfig` to Responses requests and read-side
`MemoryConfig` to the built-in Responses provider
- gates Memory Alpha behind `MemoryConfig.enabled=False` by default so
server operators must explicitly opt in
- retrieves memory from the configured vector store only with the memory
metadata filter and a required owner filter
- resolves owner scope from the authenticated principal when present, so
request metadata cannot spoof another owner
- keeps vector-store ABAC on the `openai_search_vector_store` path and
treats denied memory reads as no injected memory
- injects retrieved memory as hidden system context, without file-search
outputs, annotations, or citations
- bounds retrieved memory context by result count and approximate token
budget
- regenerates API schemas, Stainless schemas, and provider docs for the
read-side memory surface
## Test plan
- `uv run pytest
tests/unit/providers/responses/builtin/test_openai_responses_memory.py
-q` -> 13 passed
- `uv run pytest tests/unit/api/test_responses_memory_models.py
tests/unit/providers/responses/builtin/test_openai_responses_memory.py
-q` -> 16 passed
- `uv run pre-commit run --all-files` -> passed
## Stack
- PR 1: #6162 read path
- PR 2: #6163 write path and Memory Alpha docs
---------
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>1 parent 737c445 commit 2ec2f28
16 files changed
Lines changed: 1005 additions & 10 deletions
File tree
- client-sdks/stainless
- docs
- docs/providers/responses
- static
- src
- ogx_api
- responses
- ogx
- core/server
- providers/inline/responses/builtin
- responses
- tests/unit
- api
- providers/responses/builtin
- server
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12216 | 12216 | | |
12217 | 12217 | | |
12218 | 12218 | | |
| 12219 | + | |
| 12220 | + | |
| 12221 | + | |
| 12222 | + | |
| 12223 | + | |
| 12224 | + | |
| 12225 | + | |
12219 | 12226 | | |
12220 | 12227 | | |
12221 | 12228 | | |
| |||
12839 | 12846 | | |
12840 | 12847 | | |
12841 | 12848 | | |
| 12849 | + | |
| 12850 | + | |
| 12851 | + | |
| 12852 | + | |
| 12853 | + | |
| 12854 | + | |
| 12855 | + | |
| 12856 | + | |
| 12857 | + | |
| 12858 | + | |
| 12859 | + | |
| 12860 | + | |
| 12861 | + | |
| 12862 | + | |
| 12863 | + | |
| 12864 | + | |
| 12865 | + | |
| 12866 | + | |
| 12867 | + | |
| 12868 | + | |
| 12869 | + | |
| 12870 | + | |
| 12871 | + | |
| 12872 | + | |
| 12873 | + | |
| 12874 | + | |
| 12875 | + | |
| 12876 | + | |
| 12877 | + | |
| 12878 | + | |
| 12879 | + | |
| 12880 | + | |
| 12881 | + | |
| 12882 | + | |
| 12883 | + | |
| 12884 | + | |
| 12885 | + | |
| 12886 | + | |
| 12887 | + | |
| 12888 | + | |
| 12889 | + | |
| 12890 | + | |
| 12891 | + | |
| 12892 | + | |
| 12893 | + | |
| 12894 | + | |
| 12895 | + | |
12842 | 12896 | | |
12843 | 12897 | | |
12844 | 12898 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
94 | 102 | | |
95 | 103 | | |
96 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11285 | 11285 | | |
11286 | 11286 | | |
11287 | 11287 | | |
| 11288 | + | |
| 11289 | + | |
| 11290 | + | |
| 11291 | + | |
| 11292 | + | |
| 11293 | + | |
| 11294 | + | |
11288 | 11295 | | |
11289 | 11296 | | |
11290 | 11297 | | |
| |||
11526 | 11533 | | |
11527 | 11534 | | |
11528 | 11535 | | |
| 11536 | + | |
| 11537 | + | |
| 11538 | + | |
| 11539 | + | |
| 11540 | + | |
| 11541 | + | |
| 11542 | + | |
| 11543 | + | |
| 11544 | + | |
| 11545 | + | |
| 11546 | + | |
| 11547 | + | |
| 11548 | + | |
| 11549 | + | |
| 11550 | + | |
| 11551 | + | |
| 11552 | + | |
| 11553 | + | |
| 11554 | + | |
| 11555 | + | |
| 11556 | + | |
| 11557 | + | |
| 11558 | + | |
| 11559 | + | |
| 11560 | + | |
| 11561 | + | |
| 11562 | + | |
| 11563 | + | |
| 11564 | + | |
| 11565 | + | |
| 11566 | + | |
| 11567 | + | |
| 11568 | + | |
| 11569 | + | |
| 11570 | + | |
| 11571 | + | |
| 11572 | + | |
| 11573 | + | |
| 11574 | + | |
| 11575 | + | |
| 11576 | + | |
| 11577 | + | |
| 11578 | + | |
| 11579 | + | |
| 11580 | + | |
| 11581 | + | |
| 11582 | + | |
11529 | 11583 | | |
11530 | 11584 | | |
11531 | 11585 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12216 | 12216 | | |
12217 | 12217 | | |
12218 | 12218 | | |
| 12219 | + | |
| 12220 | + | |
| 12221 | + | |
| 12222 | + | |
| 12223 | + | |
| 12224 | + | |
| 12225 | + | |
12219 | 12226 | | |
12220 | 12227 | | |
12221 | 12228 | | |
| |||
12839 | 12846 | | |
12840 | 12847 | | |
12841 | 12848 | | |
| 12849 | + | |
| 12850 | + | |
| 12851 | + | |
| 12852 | + | |
| 12853 | + | |
| 12854 | + | |
| 12855 | + | |
| 12856 | + | |
| 12857 | + | |
| 12858 | + | |
| 12859 | + | |
| 12860 | + | |
| 12861 | + | |
| 12862 | + | |
| 12863 | + | |
| 12864 | + | |
| 12865 | + | |
| 12866 | + | |
| 12867 | + | |
| 12868 | + | |
| 12869 | + | |
| 12870 | + | |
| 12871 | + | |
| 12872 | + | |
| 12873 | + | |
| 12874 | + | |
| 12875 | + | |
| 12876 | + | |
| 12877 | + | |
| 12878 | + | |
| 12879 | + | |
| 12880 | + | |
| 12881 | + | |
| 12882 | + | |
| 12883 | + | |
| 12884 | + | |
| 12885 | + | |
| 12886 | + | |
| 12887 | + | |
| 12888 | + | |
| 12889 | + | |
| 12890 | + | |
| 12891 | + | |
| 12892 | + | |
| 12893 | + | |
| 12894 | + | |
| 12895 | + | |
12842 | 12896 | | |
12843 | 12897 | | |
12844 | 12898 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
243 | 244 | | |
244 | 245 | | |
245 | 246 | | |
246 | | - | |
247 | | - | |
248 | | - | |
| 247 | + | |
249 | 248 | | |
250 | 249 | | |
251 | 250 | | |
252 | 251 | | |
253 | 252 | | |
254 | | - | |
| 253 | + | |
255 | 254 | | |
256 | 255 | | |
257 | 256 | | |
258 | 257 | | |
259 | 258 | | |
260 | 259 | | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
261 | 268 | | |
262 | 269 | | |
263 | 270 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
| |||
106 | 112 | | |
107 | 113 | | |
108 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
109 | 151 | | |
110 | 152 | | |
111 | 153 | | |
| |||
127 | 169 | | |
128 | 170 | | |
129 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
130 | 177 | | |
131 | 178 | | |
132 | 179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
| |||
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
| 170 | + | |
169 | 171 | | |
170 | 172 | | |
171 | 173 | | |
| |||
0 commit comments