mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix(kimi-coding): add KIMI_CODING_API_KEY fallback + api_mode detection for /coding endpoint
This commit is contained in:
parent
fd403854b9
commit
bad5471409
2 changed files with 3 additions and 2 deletions
|
|
@ -169,7 +169,7 @@ PROVIDER_REGISTRY: Dict[str, ProviderConfig] = {
|
|||
name="Kimi / Moonshot",
|
||||
auth_type="api_key",
|
||||
inference_base_url="https://api.moonshot.ai/v1",
|
||||
api_key_env_vars=("KIMI_API_KEY",),
|
||||
api_key_env_vars=("KIMI_API_KEY", "KIMI_CODING_API_KEY"),
|
||||
base_url_env_var="KIMI_BASE_URL",
|
||||
),
|
||||
"kimi-coding-cn": ProviderConfig(
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue