Commit 740c580
Roo Code
fix: resolve moonshotai/kimi-k2-instruct max_tokens limit issue
- Update moonshotai/kimi-k2-instruct maxTokens from 8192 to 16384 to match API limit
- Add validation in BaseOpenAiCompatibleProvider to ensure max_tokens never exceeds model limits
- Prevent 400 error when users set modelMaxTokens above API constraints
Fixes #57291 parent 8a3dcfb commit 740c580
File tree
2 files changed
+7
-2
lines changed- packages/types/src/providers
- src/api/providers
2 files changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
77 | 82 | | |
78 | 83 | | |
79 | 84 | | |
| |||
0 commit comments