Commit 7a45ba6
committed
fix(oci): complete casing audit for OCI field transformations
Fix remaining casing issues found during systematic audit:
- V1 tools: uppercase type field (same fix as V2)
- tool_calls in messages: uppercase type when sending tool results back
in multi-turn conversations
- Response tool_calls: lowercase type from OCI's "FUNCTION" back to
"function" for Cohere SDK compatibility
- safety_mode: uppercase defensively (CONTEXTUAL/STRICT/OFF)
Integration tests added for each:
- test_chat_tool_use_response_type_lowered: verifies tool_call.type
is "function" (not "FUNCTION") in responses
- test_chat_multi_turn_tool_use_v2: full tool use round-trip (call →
result → final response)
- test_chat_safety_mode_v2: verifies safety_mode works on OCI1 parent ec9e58b commit 7a45ba6
2 files changed
Lines changed: 121 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
728 | 728 | | |
729 | 729 | | |
730 | 730 | | |
731 | | - | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
732 | 738 | | |
733 | 739 | | |
734 | 740 | | |
| |||
772 | 778 | | |
773 | 779 | | |
774 | 780 | | |
775 | | - | |
| 781 | + | |
776 | 782 | | |
777 | 783 | | |
778 | 784 | | |
| |||
816 | 822 | | |
817 | 823 | | |
818 | 824 | | |
819 | | - | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
820 | 832 | | |
821 | 833 | | |
822 | 834 | | |
823 | 835 | | |
824 | 836 | | |
825 | | - | |
| 837 | + | |
826 | 838 | | |
827 | 839 | | |
828 | 840 | | |
| |||
917 | 929 | | |
918 | 930 | | |
919 | 931 | | |
920 | | - | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
921 | 938 | | |
922 | 939 | | |
923 | 940 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
218 | 317 | | |
219 | 318 | | |
220 | 319 | | |
| |||
0 commit comments