Commit 191c516
unified client interface (#897)
* feat(clients): introduce unified client interface and provider adapters
* refactor(environment): migrate rollout core to Response + tool_defs
* refactor(envs): align tool/multiturn/integrations with new message and tool flow
* refactor(eval): unify eval outputs/serialization and improve display plumbing
* test(migration): update env/tool trajectory tests for unified client/types
* test(envs): harden env smoke tests and fixture setup for clean installs
* chore(endpoints): annotate endpoint registry with explicit client types
* dont strip client types
* small reversions
* format checks
* cleaner handling of pure completions with custom types
* formatting
* patch single turn to convert message list back to raw string
* safe serialization, output has both oai_tools and tool_defs
* test needs to accept kwargs
* update tests with tool_defs
* rename convert_func_to_tool_def
* formatting
* fix lines in types
* harden tool_defs/oai_tools to error when oai tools are passed in
* harden downstream reading of tool_defs
* use vf.client
* much tighter use of custom types
* get rid of legacy response.choices
* patch test
* clean up into unified normalized_messages util function
* bugbot fixes
* cli tool normalization
* more cli stuff
* add text message to client message types
* bugbot, normalize no tool calls across clients
* reasoning first
* ty check
* fix anthropic tool call blocks
* cli agent intercept back to openai types
* usage in anthropic types
* normalize raw tool calls oai tools
* cleaner errors
* revert to error string matches and pass through interleaved thinking to anthropic client
* small prepend system prompt edit
* small formatting
* max completion tokens rename
* anthropic overlong error
* bugbot shallow copy
* Codex-generated pull request (#889)
Co-authored-by: will brown <willccbb@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
* flatten back into a string at the end for completions
* preserve thinking block anthropic content:
* remove interleaved from eval config
* minor
* each client in its own file
* move some stuff around
* rename to content_to_text
* do not warn on pydantic serialization on env worker
* client everywhere
* fix ty
* fix endpoints
* pop unrecognized stop arg
* add deepseek reasoner
* remove interleaved thinking from env
* fix tests with claude
* rename to mock_client
* update docs
* updated more reasoning content fields
* do not make interleaved settable on client
* simplify
* make thinking block part of our ass msg type
* fix endpoints
* rename to oai_tools
* allow closing clients
* removed unused native client
* add docs
* conditional warn
* only add reasoning content if its a string
---------
Co-authored-by: eligotts <78387377+eligotts@users.noreply.github.com>
Co-authored-by: will brown <williambrown97@gmail.com>
Co-authored-by: will brown <willccbb@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>1 parent 54005ee commit 191c516
71 files changed
Lines changed: 4779 additions & 2552 deletions
File tree
- configs
- docs
- environments
- openenv_echo
- openenv_textarena
- tests
- verifiers
- clients
- envs
- experimental
- integrations
- gepa
- parsers
- scripts
- utils
- workers
- client
- server
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
| 26 | + | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
26 | | - | |
27 | | - | |
28 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
29 | 34 | | |
30 | 35 | | |
31 | | - | |
32 | | - | |
33 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
34 | 40 | | |
35 | 41 | | |
36 | | - | |
37 | | - | |
38 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
39 | 72 | | |
40 | 73 | | |
41 | 74 | | |
42 | 75 | | |
43 | 76 | | |
44 | 77 | | |
| 78 | + | |
45 | 79 | | |
46 | 80 | | |
47 | 81 | | |
48 | 82 | | |
49 | 83 | | |
| 84 | + | |
50 | 85 | | |
51 | 86 | | |
52 | 87 | | |
53 | 88 | | |
54 | 89 | | |
| 90 | + | |
55 | 91 | | |
56 | 92 | | |
57 | 93 | | |
58 | 94 | | |
59 | 95 | | |
| 96 | + | |
60 | 97 | | |
61 | 98 | | |
62 | 99 | | |
63 | 100 | | |
64 | 101 | | |
| 102 | + | |
65 | 103 | | |
66 | 104 | | |
67 | 105 | | |
68 | 106 | | |
69 | 107 | | |
70 | 108 | | |
| 109 | + | |
71 | 110 | | |
72 | 111 | | |
73 | 112 | | |
74 | 113 | | |
75 | 114 | | |
| 115 | + | |
76 | 116 | | |
77 | 117 | | |
78 | 118 | | |
79 | 119 | | |
80 | 120 | | |
| 121 | + | |
81 | 122 | | |
82 | 123 | | |
83 | 124 | | |
84 | 125 | | |
85 | 126 | | |
| 127 | + | |
86 | 128 | | |
87 | 129 | | |
88 | 130 | | |
89 | 131 | | |
90 | 132 | | |
| 133 | + | |
91 | 134 | | |
92 | 135 | | |
93 | 136 | | |
94 | 137 | | |
95 | 138 | | |
| 139 | + | |
96 | 140 | | |
97 | 141 | | |
98 | 142 | | |
99 | 143 | | |
100 | 144 | | |
| 145 | + | |
101 | 146 | | |
102 | 147 | | |
103 | 148 | | |
104 | 149 | | |
105 | 150 | | |
| 151 | + | |
106 | 152 | | |
107 | 153 | | |
108 | 154 | | |
109 | 155 | | |
110 | 156 | | |
111 | 157 | | |
| 158 | + | |
112 | 159 | | |
113 | 160 | | |
114 | 161 | | |
115 | 162 | | |
116 | 163 | | |
| 164 | + | |
117 | 165 | | |
118 | 166 | | |
119 | 167 | | |
120 | 168 | | |
121 | 169 | | |
122 | 170 | | |
| 171 | + | |
123 | 172 | | |
124 | 173 | | |
125 | 174 | | |
126 | 175 | | |
127 | 176 | | |
| 177 | + | |
128 | 178 | | |
129 | 179 | | |
130 | 180 | | |
131 | 181 | | |
132 | 182 | | |
| 183 | + | |
133 | 184 | | |
134 | 185 | | |
135 | 186 | | |
136 | 187 | | |
137 | 188 | | |
| 189 | + | |
138 | 190 | | |
139 | 191 | | |
140 | 192 | | |
141 | 193 | | |
142 | 194 | | |
| 195 | + | |
143 | 196 | | |
144 | 197 | | |
145 | 198 | | |
146 | 199 | | |
147 | 200 | | |
| 201 | + | |
148 | 202 | | |
149 | 203 | | |
150 | 204 | | |
151 | 205 | | |
152 | 206 | | |
| 207 | + | |
153 | 208 | | |
154 | 209 | | |
155 | 210 | | |
156 | 211 | | |
157 | 212 | | |
| 213 | + | |
158 | 214 | | |
159 | 215 | | |
160 | 216 | | |
161 | 217 | | |
162 | 218 | | |
| 219 | + | |
163 | 220 | | |
164 | 221 | | |
165 | 222 | | |
166 | 223 | | |
167 | 224 | | |
| 225 | + | |
168 | 226 | | |
169 | 227 | | |
170 | 228 | | |
171 | 229 | | |
172 | 230 | | |
173 | 231 | | |
| 232 | + | |
174 | 233 | | |
175 | 234 | | |
176 | 235 | | |
177 | 236 | | |
178 | 237 | | |
| 238 | + | |
179 | 239 | | |
180 | 240 | | |
181 | 241 | | |
182 | 242 | | |
183 | 243 | | |
| 244 | + | |
184 | 245 | | |
185 | 246 | | |
186 | 247 | | |
187 | 248 | | |
188 | 249 | | |
| 250 | + | |
189 | 251 | | |
190 | 252 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
153 | | - | |
154 | 152 | | |
155 | | - | |
| 153 | + | |
| 154 | + | |
156 | 155 | | |
157 | 156 | | |
158 | 157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
86 | 94 | | |
87 | 95 | | |
| 96 | + | |
| 97 | + | |
88 | 98 | | |
89 | 99 | | |
90 | 100 | | |
| |||
0 commit comments