Commit c6129b0
Mateusz
fix(codex): use Responses API format for non-streaming translation so usage is preserved
- Change executor to_domain_response call from 'openai' to 'openai-responses'
so Responses API fields (input_tokens/output_tokens) are properly normalized
- Add input_tokens/output_tokens fallback mapping in UsageSummary.from_dict
- Compute total_tokens when missing from input+output
- Update test assertion for new format parameter
- Update demo script to validate both streaming and legacy frontend paths1 parent b6e4a7e commit c6129b0
4 files changed
Lines changed: 39 additions & 7 deletions
File tree
- dev/scripts
- src
- connectors/openai_codex
- core/domain
- tests/unit/connectors/openai_codex
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
| 85 | + | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
91 | 106 | | |
92 | 107 | | |
93 | 108 | | |
| |||
193 | 208 | | |
194 | 209 | | |
195 | 210 | | |
196 | | - | |
| 211 | + | |
197 | 212 | | |
198 | 213 | | |
199 | 214 | | |
| |||
218 | 233 | | |
219 | 234 | | |
220 | 235 | | |
| 236 | + | |
221 | 237 | | |
222 | 238 | | |
| 239 | + | |
223 | 240 | | |
224 | 241 | | |
225 | 242 | | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
226 | 248 | | |
227 | 249 | | |
228 | 250 | | |
229 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
230 | 254 | | |
231 | 255 | | |
232 | 256 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
583 | 583 | | |
584 | 584 | | |
585 | 585 | | |
| 586 | + | |
586 | 587 | | |
587 | 588 | | |
588 | 589 | | |
589 | | - | |
| 590 | + | |
590 | 591 | | |
591 | 592 | | |
592 | 593 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
52 | 54 | | |
| 55 | + | |
| 56 | + | |
53 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
54 | 61 | | |
55 | 62 | | |
56 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
394 | | - | |
| 394 | + | |
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
| |||
0 commit comments