test(kimi): cover api.moonshot.cn direct-call regressions\n\n- add run_agent coverage for the Moonshot China endpoint\n- add sync/async trajectory compressor coverage for api.moonshot.cn

This commit is contained in:
kshitijk4poor
2026-04-20 12:49:31 +05:30
committed by Teknium
parent 9b60ffc47f
commit e485bc60cd
3 changed files with 63 additions and 0 deletions

View File

@@ -928,6 +928,16 @@ class TestBuildApiKwargs:
assert kwargs["temperature"] == 1.0
def test_public_moonshot_cn_kimi_k2_5_forces_temperature_1(self, agent):
agent.base_url = "https://api.moonshot.cn/v1"
agent._base_url_lower = agent.base_url.lower()
agent.model = "kimi-k2.5"
messages = [{"role": "user", "content": "hi"}]
kwargs = agent._build_api_kwargs(messages)
assert kwargs["temperature"] == 1.0
def test_kimi_coding_endpoint_keeps_kimi_k2_5_at_0_6(self, agent):
agent.base_url = "https://api.kimi.com/coding/v1"
agent._base_url_lower = agent.base_url.lower()