Commit 0f209b4
test: assert the error names the SDK's own number, not a model's (#28)
Follow-up to #27. Two gaps in its tests:
- The real-ceiling assertions (128000, 262144) sat inside
test_accept_valid_values alongside 1/100/1000, so a failure there would not
say which kind of value broke. Split into their own test with the probe
evidence attached.
- Nothing asserted the message content. The whole reason #27 exists is that
the old text, 'max_tokens too large (maximum: 100000)', read like a provider
response and was recorded as an upstream model ceiling in a downstream token
table. If the message regresses to that shape the bug returns, and no test
would have caught it. Now pinned: the message must name the SDK's own limit
and disclaim being a model limit.
Also references MAX_TOKENS_SANITY_LIMIT instead of hardcoding 2_000_000, so
the test follows the constant if it moves.
Co-authored-by: 1bcMax <[email protected]>1 parent 5fc5bd2 commit 0f209b4
1 file changed
Lines changed: 18 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | 134 | | |
138 | 135 | | |
139 | 136 | | |
| |||
151 | 148 | | |
152 | 149 | | |
153 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
154 | 164 | | |
155 | | - | |
| 165 | + | |
156 | 166 | | |
157 | 167 | | |
158 | 168 | | |
159 | 169 | | |
160 | 170 | | |
161 | 171 | | |
162 | | - | |
163 | | - | |
164 | | - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
165 | 175 | | |
166 | 176 | | |
167 | 177 | | |
| |||
0 commit comments