Repository navigation
Commit 537322a
committed
fix(server): handle fractional limits and interrupted context usage
- require integer context windows before emitting maxTokens
(fractional limits violated PositiveInt and could persist)
- keep emitting token usage even when display output is suppressed
after an interrupt, otherwise the meter underreports until the
next completed message1 parent 09a9319 commit 537322a
1 file changed
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| 249 | + | |
249 | 250 | | |
250 | 251 | | |
251 | 252 | | |
| |||
1118 | 1119 | | |
1119 | 1120 | | |
1120 | 1121 | | |
| 1122 | + | |
1121 | 1123 | | |
1122 | 1124 | | |
1123 | 1125 | | |
| |||
2159 | 2161 | | |
2160 | 2162 | | |
2161 | 2163 | | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
| 2167 | + | |
| 2168 | + | |
| 2169 | + | |
| 2170 | + | |
| 2171 | + | |
| 2172 | + | |
| 2173 | + | |
| 2174 | + | |
| 2175 | + | |
| 2176 | + | |
| 2177 | + | |
| 2178 | + | |
| 2179 | + | |
| 2180 | + | |
| 2181 | + | |
2162 | 2182 | | |
2163 | 2183 | | |
2164 | 2184 | | |
| |||
0 commit comments