fix: Enhance Kimi Coding API mode detection and User-Agent

This commit is contained in:
王强 2026-04-18 23:01:53 +08:00 committed by Teknium
parent 2a026eb762
commit 6caf8bd994
3 changed files with 15 additions and 2 deletions

View file

@ -678,6 +678,7 @@ def switch_model(
_da = DIRECT_ALIASES.get(resolved_alias)
if _da is not None and _da.base_url:
base_url = _da.base_url
api_mode = "" # clear so determine_api_mode re-detects from URL
if not api_key:
api_key = "no-key-required"