mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-05-01 23:35:52 +00:00
test(anthropic): cover remaining opus-4-7 temperature branches
The existing test only verified the adaptive path. Add two more cases: - enabled thinking (high): temperature must also be omitted - no thinking (None): temperature must still be omitted Made-with: Cursor
This commit is contained in:
parent
9239429a00
commit
3441d5f89c
@ -65,7 +65,21 @@ def test_none_does_not_enable_thinking() -> None:
|
||||
assert kw["temperature"] == 0.7
|
||||
|
||||
|
||||
def test_opus_4_7_omits_temperature() -> None:
|
||||
def test_opus_4_7_omits_temperature_adaptive() -> None:
|
||||
kw = _build(_make_provider("claude-opus-4-7"), "adaptive")
|
||||
assert "temperature" not in kw
|
||||
assert kw["thinking"] == {"type": "adaptive"}
|
||||
|
||||
|
||||
def test_opus_4_7_omits_temperature_enabled() -> None:
|
||||
"""Enabled thinking (high) must also omit temperature for opus-4-7."""
|
||||
kw = _build(_make_provider("claude-opus-4-7"), "high", max_tokens=4096)
|
||||
assert "temperature" not in kw
|
||||
assert kw["thinking"]["type"] == "enabled"
|
||||
|
||||
|
||||
def test_opus_4_7_omits_temperature_none() -> None:
|
||||
"""Without thinking, opus-4-7 must still omit temperature (API rejects it)."""
|
||||
kw = _build(_make_provider("claude-opus-4-7"), None)
|
||||
assert "temperature" not in kw
|
||||
assert "thinking" not in kw
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user