Commit 76abb9c
feat: add depth>1 recursive subcalls with limits and cost tracking (#84)
* feat: add depth>1 recursive subcalls
* Add max_budget support for cost limiting
- Add max_budget parameter to RLM (in USD)
- Add BudgetExceededError exception
- Track cumulative cost across iterations
- Propagate remaining budget to child RLMs
- Add print_budget_exceeded to VerbosePrinter
- Export BudgetExceededError from rlm module
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: add budget support and complete depth>1 features
* fix: _subcall returns RLMChatCompletion, remove inject_file
* docs: update for depth>1, add e2e test
* additional logging and refactoring of sub-RLM logic
* updated compaction logic
* change metadata prompt to be from user
* reformat depth test
* update nano token counts correctly
* remove bad changes
* revert CONTRIBUTING
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Alex Zhang <alex.lx.zhang@gmail.com>1 parent b38ad84 commit 76abb9c
File tree
23 files changed
+3168
-216
lines changed- docs
- api
- examples
- rlm
- clients
- core
- environments
- logger
- utils
- tests
23 files changed
+3168
-216
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
| 159 | + | |
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
| 167 | + | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
173 | | - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
174 | 176 | | |
| 177 | + | |
175 | 178 | | |
176 | 179 | | |
177 | 180 | | |
| |||
204 | 207 | | |
205 | 208 | | |
206 | 209 | | |
207 | | - | |
| 210 | + | |
| 211 | + | |
208 | 212 | | |
209 | 213 | | |
210 | 214 | | |
| |||
223 | 227 | | |
224 | 228 | | |
225 | 229 | | |
226 | | - | |
| 230 | + | |
227 | 231 | | |
228 | 232 | | |
229 | 233 | | |
| |||
242 | 246 | | |
243 | 247 | | |
244 | 248 | | |
245 | | - | |
246 | | - | |
| 249 | + | |
| 250 | + | |
247 | 251 | | |
248 | 252 | | |
249 | 253 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | | - | |
| 127 | + | |
| 128 | + | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| |||
0 commit comments