mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-25 01:09:19 +08:00
fix: store 证伪时优先无状态 Responses,失败再降 Completions
This commit is contained in:
@@ -29,17 +29,22 @@ def test_plan_store_true_allows_chain():
|
||||
assert ProtocolAttempt(True, True, False) in attempts
|
||||
|
||||
|
||||
def test_plan_store_false_uses_completions():
|
||||
"""DeepSeek 等:Responses 无状态时用 Completions 带 Mongo 历史。"""
|
||||
def test_plan_store_false_prefers_stateless_responses_then_completions():
|
||||
"""store 证伪:无状态 Responses(全量历史)→ Completions。"""
|
||||
cap = LlmProtocolCapability(responses=True, store=False)
|
||||
attempts = plan_protocol_attempts("auto", cap, has_chain_id=True)
|
||||
assert attempts == [ProtocolAttempt(False, False, False)]
|
||||
assert attempts == [
|
||||
ProtocolAttempt(True, False, False),
|
||||
ProtocolAttempt(False, False, False),
|
||||
]
|
||||
assert not any(a.use_chain or a.use_store for a in attempts)
|
||||
|
||||
|
||||
def test_plan_store_false_forced_responses_still_completions():
|
||||
def test_plan_store_false_forced_responses_same_ladder():
|
||||
cap = LlmProtocolCapability(responses=True, store=False)
|
||||
attempts = plan_protocol_attempts("responses", cap, has_chain_id=False)
|
||||
assert attempts == [ProtocolAttempt(False, False, False)]
|
||||
assert attempts[0] == ProtocolAttempt(True, False, False)
|
||||
assert ProtocolAttempt(False, False, False) in attempts
|
||||
|
||||
|
||||
def test_plan_completions_only():
|
||||
|
||||
Reference in New Issue
Block a user