Commit b833c70
fix: strip temperature/top_p for reasoning models in AgentBuilder
Reasoning models (o1, o3, o4, gpt-5.x) reject custom temperature and
top_p values. The old agent-framework beta silently stripped these, but
1.1.1+ passes them through causing 400 errors. This fix auto-detects
the model name from the client and removes unsupported params before
building ChatOptions.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 96df974 commit b833c70
2 files changed
Lines changed: 96 additions & 0 deletions
File tree
- src
- ContentProcessorWorkflow/src/libs/agent_framework
- ContentProcessor/src/libs/agent_framework
Lines changed: 48 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
30 | 72 | | |
31 | 73 | | |
32 | 74 | | |
| |||
483 | 525 | | |
484 | 526 | | |
485 | 527 | | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
486 | 531 | | |
487 | 532 | | |
488 | 533 | | |
| |||
821 | 866 | | |
822 | 867 | | |
823 | 868 | | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
824 | 872 | | |
825 | 873 | | |
826 | 874 | | |
| |||
Lines changed: 48 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
51 | 93 | | |
52 | 94 | | |
53 | 95 | | |
| |||
518 | 560 | | |
519 | 561 | | |
520 | 562 | | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
521 | 566 | | |
522 | 567 | | |
523 | 568 | | |
| |||
869 | 914 | | |
870 | 915 | | |
871 | 916 | | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
872 | 920 | | |
873 | 921 | | |
874 | 922 | | |
| |||
0 commit comments