fix(kimi-coding): add KIMI_CODING_API_KEY fallback + api_mode detection for /coding endpoint

This commit is contained in:
王强
2026-04-18 08:09:41 +08:00
committed by Teknium
parent fd403854b9
commit bad5471409
2 changed files with 3 additions and 2 deletions

View File

@@ -210,7 +210,8 @@ def _resolve_runtime_from_pool_entry(
api_mode = opencode_model_api_mode(provider, model_cfg.get("default", ""))
else:
# Auto-detect Anthropic-compatible endpoints (/anthropic suffix,
# api.openai.com → codex_responses, api.x.ai → codex_responses).
# Kimi /coding, api.openai.com → codex_responses, api.x.ai →
# codex_responses).
detected = _detect_api_mode_for_url(base_url)
if detected:
api_mode = detected