Commit c54c4f3
KrasimirKralev
fix(transport): honor compat.requiresReasoningContentOnAssistantMessages from config
Addresses clawsweeper review on #89832 (P1 compatibility trap).
getCompat() in openai-transport-stream resolved every compat field as
"compat.X ?? detected.X" EXCEPT requiresReasoningContentOnAssistantMessages,
which used detected.X alone. So a custom OpenAI-compatible proxy (not
auto-detected as DeepSeek/Xiaomi) that set the flag in config would pass
schema validation but be ignored by the active transport — a
startup-success/runtime-failure trap. Now resolves compat.X ?? detected.X,
matching openai-completions.ts:1333 and every sibling field.
Exposes getCompat via the existing test-only testing export and adds a
focused regression: a custom provider with the flag set resolves true
(verified to fail against the pre-fix detected-only code); the same
provider without the flag falls back to detection (false).1 parent d43aceb commit c54c4f3
2 files changed
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10097 | 10097 | | |
10098 | 10098 | | |
10099 | 10099 | | |
| 10100 | + | |
| 10101 | + | |
| 10102 | + | |
| 10103 | + | |
| 10104 | + | |
| 10105 | + | |
| 10106 | + | |
| 10107 | + | |
| 10108 | + | |
| 10109 | + | |
| 10110 | + | |
| 10111 | + | |
| 10112 | + | |
| 10113 | + | |
| 10114 | + | |
| 10115 | + | |
| 10116 | + | |
| 10117 | + | |
| 10118 | + | |
| 10119 | + | |
| 10120 | + | |
| 10121 | + | |
| 10122 | + | |
| 10123 | + | |
| 10124 | + | |
| 10125 | + | |
| 10126 | + | |
| 10127 | + | |
| 10128 | + | |
| 10129 | + | |
| 10130 | + | |
| 10131 | + | |
| 10132 | + | |
10100 | 10133 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3432 | 3432 | | |
3433 | 3433 | | |
3434 | 3434 | | |
| 3435 | + | |
3435 | 3436 | | |
3436 | 3437 | | |
3437 | 3438 | | |
| |||
4277 | 4278 | | |
4278 | 4279 | | |
4279 | 4280 | | |
| 4281 | + | |
4280 | 4282 | | |
4281 | 4283 | | |
4282 | 4284 | | |
| |||
0 commit comments