hermes-agent/agent
Christo Mitov 4447e7d71a fix: add Kimi Code API support (api.kimi.com/coding/v1)
Kimi Code (platform.kimi.ai) issues API keys prefixed sk-kimi- that require:
1. A different base URL: api.kimi.com/coding/v1 (not api.moonshot.ai/v1)
2. A User-Agent header identifying a recognized coding agent

Without this fix, sk-kimi- keys fail with 401 (wrong endpoint) or 403
('only available for Coding Agents') errors.

Changes:
- Auto-detect sk-kimi- key prefix and route to api.kimi.com/coding/v1
- Send User-Agent: KimiCLI/1.0 header for Kimi Code endpoints
- Legacy Moonshot keys (api.moonshot.ai) continue to work unchanged
- KIMI_BASE_URL env var override still takes priority over auto-detection
- Updated .env.example with correct docs and all endpoint options
- Fixed doctor.py health check for Kimi Code keys

Reference: https://github.com/MoonshotAI/kimi-cli (platforms.py)
2026-03-07 21:00:12 -05:00
..
__init__.py Refactor Terminal and AIAgent cleanup 2026-02-21 22:31:43 -08:00
auxiliary_client.py fix: add Kimi Code API support (api.kimi.com/coding/v1) 2026-03-07 21:00:12 -05:00
context_compressor.py refactor(context_compressor): improve summary generation logic and error handling 2026-03-07 11:54:51 -08:00
display.py feat: show detailed tool call args in gateway based on config 2026-03-02 05:23:15 -08:00
insights.py chore: add GLM/Kimi/MiniMax models to insights pricing (zero cost) 2026-03-06 19:12:14 -08:00
model_metadata.py chore: add context lengths for Kimi and MiniMax models 2026-03-06 19:01:38 -08:00
prompt_builder.py feat: default reasoning effort from xhigh to medium 2026-03-07 10:14:19 -08:00
prompt_caching.py Refactor Terminal and AIAgent cleanup 2026-02-21 22:31:43 -08:00
redact.py refactor(cli, auth): Add Codex/OpenAI OAuth Support - finalized 2026-02-28 21:56:27 -08:00
skill_commands.py feat: platform-conditional skill loading + Apple/macOS skills 2026-03-07 00:47:54 -08:00
trajectory.py Refactor Terminal and AIAgent cleanup 2026-02-21 22:31:43 -08:00