fix: 兼容图片模型的网关别名
This commit is contained in:
@ -24,6 +24,7 @@ from snooper_summary import (
|
||||
normalize_self_name,
|
||||
previous_workday,
|
||||
require_efund_model,
|
||||
require_matching_efund_model,
|
||||
resolve_day,
|
||||
sanitize_wikilink_pipes,
|
||||
shorten_headings,
|
||||
@ -145,6 +146,14 @@ def test_system_only_private_chat_does_not_require_a_person_name():
|
||||
assert session.post_calls == []
|
||||
|
||||
|
||||
def test_model_response_accepts_only_matching_gateway_alias():
|
||||
requested = "auto/EFundGPT-dsv4-flash-code"
|
||||
returned = "group/auto-efundgpt-dsv4-flash-code"
|
||||
assert require_matching_efund_model(returned, requested) == returned
|
||||
with pytest.raises(SummaryError, match="响应模型与请求"):
|
||||
require_matching_efund_model("group/auto-other-model", requested)
|
||||
|
||||
|
||||
def test_model_policy_checks_actual_model_after_optional_routing_prefix():
|
||||
assert require_efund_model(DEFAULT_MODEL) == DEFAULT_MODEL
|
||||
assert require_efund_model("EFundGPT-other") == "EFundGPT-other"
|
||||
|
||||
Reference in New Issue
Block a user