Commit f6fc823
committed
fix(providers): address Codex review on PR #67
Two P2 issues caught during PR #67 review (and surfaced by tests that
landed on main after this branch forked).
1. **OpenAI**: stop auto-injecting ``max_tokens`` / ``temperature`` into
the default kwargs. Two new tests on main
(``test_payload_quirk_default_no_rewrite`` /
``test_payload_quirk_no_max_completion_tokens_noop``) assert that
the provider does not stamp ``max_tokens`` on the payload — the
caller is responsible via ``on_payload`` or the
``max_completion_tokens_alias`` quirk. The unconditional default
also caused new-API providers (those requiring
``max_completion_tokens``) to reject requests that contained both
limit fields.
2. **Anthropic**: skip ``temperature`` when extended thinking is on.
Anthropic disallows temperature modifications with thinking; the
previous unconditional default made any reasoning-enabled request
fail. See:
https://platform.claude.com/docs/en/build-with-claude/extended-thinking#feature-compatibility
All 499 cubepi tests pass; cubebox cubepi+OpenAI-compat E2E still
green.1 parent 6bb2303 commit f6fc823
2 files changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
112 | 118 | | |
113 | 119 | | |
114 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
82 | 80 | | |
83 | 81 | | |
84 | 82 | | |
| |||
0 commit comments