Commit fc432a9
committed
fix: correct OpenAI GPT-5.1 Responses API parsing and provider defaults
Fixed parsing errors for OpenAI GPT-5.1 and OpenAI-compatible providers:
OpenAI GPT-5.1 Response Structure:
- Changed from `type` to `object` field
- Updated output array structure: output[{type: "message", content: [{type: "output_text", text: "..."}]}]
- Fixed usage token field names (input_tokens instead of prompt_tokens)
- Added proper content extraction from nested message/content structure
OpenAI-Compatible Providers:
- Set Ollama to use Chat Completions API (doesn't support Responses API)
- Set LM Studio to use Chat Completions API (doesn't support Responses API)
- Changed default to Chat Completions API for broader compatibility
- Added debug logging to capture raw JSON responses for troubleshooting
Build & Test Improvements:
- Updated Makefile to include all LLM provider features (anthropic, openai-llm, openai-compatible)
- Enhanced test_agentic_mcp.py with traceback printing for better error visibility
- Added LIBRARY_PATH for FAISS linking on macOS
Files changed:
- crates/codegraph-ai/src/openai_llm_provider.rs: Fixed GPT-5.1 response structs and parsing
- crates/codegraph-ai/src/openai_compatible_provider.rs: Set Chat Completions as default, added debug logging
- Makefile: Added all LLM provider features to build command
- test_agentic_mcp.py: Added traceback printing for error details1 parent dacbc03 commit fc432a9
File tree
4 files changed
+74
-40
lines changed- crates/codegraph-ai/src
4 files changed
+74
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
224 | 236 | | |
225 | 237 | | |
226 | 238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
183 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
184 | 185 | | |
185 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
186 | 200 | | |
187 | 201 | | |
188 | 202 | | |
| |||
196 | 210 | | |
197 | 211 | | |
198 | 212 | | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
210 | 224 | | |
211 | 225 | | |
212 | 226 | | |
213 | 227 | | |
214 | | - | |
| 228 | + | |
215 | 229 | | |
216 | 230 | | |
217 | 231 | | |
| |||
356 | 370 | | |
357 | 371 | | |
358 | 372 | | |
359 | | - | |
360 | | - | |
| 373 | + | |
361 | 374 | | |
362 | 375 | | |
363 | 376 | | |
364 | | - | |
365 | | - | |
366 | | - | |
| 377 | + | |
367 | 378 | | |
368 | | - | |
| 379 | + | |
369 | 380 | | |
370 | 381 | | |
371 | 382 | | |
372 | | - | |
| 383 | + | |
373 | 384 | | |
374 | 385 | | |
375 | 386 | | |
376 | | - | |
| 387 | + | |
377 | 388 | | |
378 | 389 | | |
379 | 390 | | |
380 | | - | |
381 | | - | |
382 | | - | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
383 | 401 | | |
384 | 402 | | |
385 | | - | |
386 | | - | |
387 | 403 | | |
388 | 404 | | |
389 | 405 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
285 | 288 | | |
286 | 289 | | |
287 | 290 | | |
| |||
413 | 416 | | |
414 | 417 | | |
415 | 418 | | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
416 | 422 | | |
417 | 423 | | |
418 | 424 | | |
| |||
0 commit comments