hermes-agent/hermes_cli
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 Hermes Agent UX Improvements 2026-02-22 02:16:11 -08:00
auth.py fix: add Kimi Code API support (api.kimi.com/coding/v1) 2026-03-07 21:00:12 -05:00
banner.py feat: show update-available notice in CLI banner 2026-03-07 07:35:36 -08:00
callbacks.py refactor: reorganize agent and CLI structure for improved clarity 2026-02-21 23:17:18 -08:00
clipboard.py fix: clipboard image paste on WSL2, Wayland, and VSCode terminal 2026-03-05 20:22:44 -08:00
codex_models.py refactor(auth): transition Codex OAuth tokens to Hermes auth store 2026-03-01 19:59:24 -08:00
colors.py Cleanup time! 2026-02-20 23:23:32 -08:00
commands.py feat: add /insights command with usage analytics and cost estimation 2026-03-06 14:04:59 -08:00
config.py fix: update setup/config UI for local browser mode 2026-03-07 01:23:27 -08:00
cron.py refactor: streamline cron job handling and update CLI commands 2026-02-21 16:21:19 -08:00
doctor.py fix: add Kimi Code API support (api.kimi.com/coding/v1) 2026-03-07 21:00:12 -05:00
gateway.py fix: resolve systemd restart loop with --replace flag (#576) 2026-03-07 18:08:12 +00:00
main.py fix: resolve systemd restart loop with --replace flag (#576) 2026-03-07 18:08:12 +00:00
models.py chore: update OpenRouter model list 2026-03-06 00:52:45 -08:00
pairing.py Cleanup time! 2026-02-20 23:23:32 -08:00
runtime_provider.py feat: add z.ai/GLM, Kimi/Moonshot, MiniMax as first-class providers 2026-03-06 18:55:18 -08:00
setup.py Merge PR #575: fix(setup): prevent OpenRouter model list fallback for Nous provider 2026-03-07 16:22:13 -08:00
skills_hub.py fix: review fixes — path traversal guard, trust_style consistency, edge cases 2026-03-06 01:40:01 -08:00
status.py fix: update setup/config UI for local browser mode 2026-03-07 01:23:27 -08:00
tools_config.py fix: update setup/config UI for local browser mode 2026-03-07 01:23:27 -08:00
uninstall.py Cleanup time! 2026-02-20 23:23:32 -08:00