Commit b13938e
committed
Fix preserveReasoning flag to control API reasoning inclusion
Changes:
1. Removed hardcoded <think> tag logic in streaming
- Previously hardcoded reasoning into assistant message text
- Now passes reasoning to addToApiConversationHistory as parameter
2. Updated buildCleanConversationHistory to respect preserveReasoning flag
- When preserveReasoning: true → reasoning block included in API requests
- When preserveReasoning: false/undefined → reasoning stripped from API
- Reasoning stored in history for all cases
3. Added temporary debug logs to base-openai-compatible-provider.ts
- Shows preserveReasoning flag value
- Logs reasoning blocks in incoming messages
- Logs <think> tags in converted messages sent to API1 parent 1000dcc commit b13938e
1 file changed
+21
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2647 | 2647 | | |
2648 | 2648 | | |
2649 | 2649 | | |
2650 | | - | |
2651 | | - | |
2652 | | - | |
2653 | | - | |
2654 | | - | |
2655 | | - | |
2656 | | - | |
2657 | 2650 | | |
2658 | 2651 | | |
2659 | 2652 | | |
2660 | 2653 | | |
2661 | | - | |
| 2654 | + | |
2662 | 2655 | | |
2663 | 2656 | | |
2664 | | - | |
| 2657 | + | |
2665 | 2658 | | |
2666 | 2659 | | |
2667 | 2660 | | |
| |||
3432 | 3425 | | |
3433 | 3426 | | |
3434 | 3427 | | |
3435 | | - | |
3436 | | - | |
| 3428 | + | |
| 3429 | + | |
| 3430 | + | |
| 3431 | + | |
| 3432 | + | |
| 3433 | + | |
| 3434 | + | |
| 3435 | + | |
3437 | 3436 | | |
3438 | 3437 | | |
3439 | | - | |
3440 | | - | |
3441 | | - | |
3442 | | - | |
| 3438 | + | |
| 3439 | + | |
| 3440 | + | |
3443 | 3441 | | |
3444 | | - | |
| 3442 | + | |
| 3443 | + | |
| 3444 | + | |
| 3445 | + | |
| 3446 | + | |
| 3447 | + | |
| 3448 | + | |
| 3449 | + | |
3445 | 3450 | | |
3446 | 3451 | | |
3447 | 3452 | | |
| |||
0 commit comments