Commit b947281
authored
fix(core): Flatten gen_ai.request.available_tools in google-genai (#18194)
While investigating [this
ticket](https://linear.app/getsentry/issue/JS-657/available-tools-json-should-be-a-stringified-json-array-of-objects-not)
I noticed that available tools are sent as a nested instead of a flat
array in google genai, which seems like a bug to me.
The format I would expect and how we do it in other integrations is:
[{tool-definition}, {tool-definition}]
What we actually send atm is:
[[{tool-definition}], [{tool-definition}]]
This PR fixes this to instead send a flat list of tool definitions.1 parent c8ca286 commit b947281
2 files changed
+6
-3
lines changedLines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
207 | 210 | | |
208 | 211 | | |
209 | 212 | | |
| |||
215 | 218 | | |
216 | 219 | | |
217 | 220 | | |
218 | | - | |
| 221 | + | |
219 | 222 | | |
220 | 223 | | |
221 | 224 | | |
| |||
236 | 239 | | |
237 | 240 | | |
238 | 241 | | |
239 | | - | |
| 242 | + | |
240 | 243 | | |
241 | 244 | | |
242 | 245 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| |||
0 commit comments