test(moa): assert aux cap against model resolver, not frozen literal
Follow-up to the salvaged fix: the regression test asserted a frozen
max_tokens == 128_000 literal, coupling it to the Opus-4-8 model table.
Assert against _get_anthropic_max_output("claude-opus-4-8") plus > 2000
instead, so the test survives model-table churn while still catching a
regression to the old `or 2000` fallback.
This commit is contained in:
parent
7951250947
commit
76be770091
1 changed files with 10 additions and 1 deletions
|
|
@ -1173,7 +1173,16 @@ class TestVisionClientFallback:
|
|||
)
|
||||
|
||||
assert response.choices[0].message.content == "aux response"
|
||||
assert captured_kwargs["max_tokens"] == 128_000
|
||||
# Behavior contract, not a frozen literal: a capless native-Anthropic
|
||||
# aux call must default to the model's native output ceiling (resolved
|
||||
# via _get_anthropic_max_output) rather than the old hidden 2000 cap.
|
||||
# Asserting against the resolver keeps this test alive across
|
||||
# model-table churn while still catching a regression to `or 2000`.
|
||||
from agent.anthropic_adapter import _get_anthropic_max_output
|
||||
|
||||
expected_ceiling = _get_anthropic_max_output("claude-opus-4-8")
|
||||
assert expected_ceiling > 2000
|
||||
assert captured_kwargs["max_tokens"] == expected_ceiling
|
||||
|
||||
|
||||
class TestAuxiliaryPoolAwareness:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue