Commit cff0328
fix: enable reasoning for third-party OpenAI-compatible proxies (#194)
### Summary
Fixes #188.
The issue was that when a user configured:
- OpenAI-compatible protocol
- A third-party proxy (e.g. univibe)
- A reasoning-capable model ID (e.g. )
would return because it only enabled reasoning for **official OpenAI
API**. This caused the synthesized PiModel to have , and the gateway
would reject the request or return empty content, resulting in and the
UI showing completed but with an empty preview.
### The fix
Extend the heuristic: for third-party OpenAI-compatible gateways, still
check if the model ID matches a known reasoning model pattern (same
patterns already used for OpenRouter). This enables for Claude 4,
o1/o3/gpt-5, qwq, deepseek-r, etc when proxied through OpenAI-compatible
endpoints.
### Testing
- Added test cases covering the issue scenario
- Existing tests still pass
- Fix verified by the issue author's log: the model on will now
correctly get
Closes #188.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Signed-off-by: Sun-sunshine06 <Sun-sunshine06@users.noreply.github.com>
Co-authored-by: Sun-sunshine06 <Sun-sunshine06@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>1 parent 1377b4f commit cff0328
2 files changed
Lines changed: 69 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
555 | 555 | | |
556 | 556 | | |
557 | 557 | | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
558 | 601 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
192 | 210 | | |
193 | 211 | | |
194 | 212 | | |
| |||
201 | 219 | | |
202 | 220 | | |
203 | 221 | | |
204 | | - | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
205 | 230 | | |
206 | 231 | | |
207 | 232 | | |
| |||
0 commit comments