@@ -795,20 +795,14 @@ def test_create_llm_zai_glm52_activates_explicit_profile_policy(
795795 assert llm is not None
796796 assert isinstance (llm .chat_provider , OpenAILegacy )
797797 assert llm .compatibility .profile_id == provider_key .removeprefix ("managed:" )
798+ assert llm .compatibility .reasoning_replay_mode == "exact"
799+ assert llm .compatibility .auto_reasoning_effort is False
800+ assert llm .compatibility .tool_stream is True
801+ assert llm .compatibility .tool_message_conversion == "extract_text"
802+ assert llm .compatibility .max_output_tokens == 131_072
798803 assert llm .chat_provider .thinking_effort is None
799804 assert llm .thinking is True
800805 assert llm .thinking_effort == "xhigh"
801- assert llm .chat_provider ._reasoning_replay_mode == "exact" # pyright: ignore[reportPrivateUsage]
802- assert llm .chat_provider ._auto_reasoning_effort is False # pyright: ignore[reportPrivateUsage]
803- assert llm .chat_provider ._tool_stream is True # pyright: ignore[reportPrivateUsage]
804- assert llm .chat_provider ._tool_message_conversion == "extract_text" # pyright: ignore[reportPrivateUsage]
805- assert llm .chat_provider ._generation_kwargs == { # pyright: ignore[reportPrivateUsage]
806- "max_tokens" : 131_072 ,
807- "extra_body" : {
808- "thinking" : {"type" : "enabled" , "clear_thinking" : False },
809- "reasoning_effort" : "max" ,
810- },
811- }
812806
813807
814808@pytest .mark .parametrize (("thinking" , "enabled" ), [(False , False ), (True , True )])
@@ -831,10 +825,10 @@ def test_create_llm_self_hosted_qwen_uses_chat_template_thinking_toggle(
831825
832826 assert llm is not None
833827 assert isinstance (llm .chat_provider , OpenAILegacy )
828+ assert llm .compatibility .profile_id == "qwen-template"
829+ assert llm .compatibility .thinking_format == "qwen_template"
834830 assert llm .chat_provider .thinking_effort is None
835- assert llm .chat_provider ._generation_kwargs .get ("extra_body" ) == { # pyright: ignore[reportPrivateUsage]
836- "chat_template_kwargs" : {"enable_thinking" : enabled }
837- }
831+ assert llm .thinking is enabled
838832
839833
840834def test_create_llm_zai_binary_model_maps_minimal_to_disabled () -> None :
@@ -854,13 +848,11 @@ def test_create_llm_zai_binary_model_maps_minimal_to_disabled() -> None:
854848
855849 assert llm is not None
856850 assert isinstance (llm .chat_provider , OpenAILegacy )
851+ assert llm .compatibility .thinking_format == "zai_binary"
852+ assert llm .compatibility .max_output_tokens == 131_072
857853 assert llm .chat_provider .thinking_effort is None
858854 assert llm .thinking is False
859855 assert llm .thinking_effort == "off"
860- assert llm .chat_provider ._generation_kwargs == { # pyright: ignore[reportPrivateUsage]
861- "max_tokens" : 131_072 ,
862- "extra_body" : {"thinking" : {"type" : "disabled" }},
863- }
864856
865857
866858def test_create_llm_local_glm_name_does_not_activate_zai_request_policy () -> None :
@@ -881,8 +873,9 @@ def test_create_llm_local_glm_name_does_not_activate_zai_request_policy() -> Non
881873 assert llm is not None
882874 assert isinstance (llm .chat_provider , OpenAILegacy )
883875 assert llm .compatibility .profile_id == "openai-compatible"
884- assert "extra_body" not in llm .chat_provider ._generation_kwargs # pyright: ignore[reportPrivateUsage]
885- assert "max_tokens" not in llm .chat_provider ._generation_kwargs # pyright: ignore[reportPrivateUsage]
876+ assert llm .compatibility .thinking_format == "none"
877+ assert llm .compatibility .max_output_tokens is None
878+ assert llm .compatibility .tool_stream is False
886879
887880
888881def test_clone_llm_with_model_alias_preserves_kimi_thinking_disabled ():
0 commit comments