Commit dd3afa1
Add GPT-4o model detection for max_completion_tokens conversion
GPT-4o models (gpt-4o, gpt-4o-mini, gpt-4o-2024-*, etc.) also require
max_completion_tokens instead of max_tokens.
Updated _is_new_generation_model() to detect all GPT-4o variants.
Fixes: "Unsupported parameter: 'max_tokens' is not supported with this model"
Co-authored-by: owndev <69784886+owndev@users.noreply.github.com>1 parent b30bed7 commit dd3afa1
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1489 | 1489 | | |
1490 | 1490 | | |
1491 | 1491 | | |
1492 | | - | |
| 1492 | + | |
1493 | 1493 | | |
1494 | 1494 | | |
1495 | 1495 | | |
1496 | | - | |
| 1496 | + | |
1497 | 1497 | | |
1498 | 1498 | | |
1499 | 1499 | | |
| |||
1503 | 1503 | | |
1504 | 1504 | | |
1505 | 1505 | | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
1506 | 1510 | | |
1507 | 1511 | | |
1508 | 1512 | | |
| |||
0 commit comments