diff --git a/agent/auxiliary_client.py b/agent/auxiliary_client.py index 9f9b94b2ba..ed2849029f 100644 --- a/agent/auxiliary_client.py +++ b/agent/auxiliary_client.py @@ -155,7 +155,7 @@ def _fixed_temperature_for_model( # Public Moonshot API has a stricter contract for some models than the # Coding Plan endpoint — check it first so it wins on conflict. - if base_url and "api.moonshot.ai" in base_url.lower(): + if base_url and ("api.moonshot.ai" in base_url.lower() or "api.moonshot.cn" in base_url.lower()): public = _KIMI_PUBLIC_API_OVERRIDES.get(bare) if public is not None: logger.debug( diff --git a/tests/agent/test_auxiliary_client.py b/tests/agent/test_auxiliary_client.py index efce666e58..67bcd0f311 100644 --- a/tests/agent/test_auxiliary_client.py +++ b/tests/agent/test_auxiliary_client.py @@ -845,6 +845,8 @@ class TestKimiForCodingTemperature: "https://api.moonshot.ai/v1", "https://api.moonshot.ai/v1/", "https://API.MOONSHOT.AI/v1", + "https://api.moonshot.cn/v1", + "https://api.moonshot.cn/v1/", ], ) def test_kimi_k2_5_public_api_forces_temperature_1(self, base_url):