MoonshotAI / MoonshotAI/kimi-cli
Feature Request: 支持自定义 API Base URL 以接入企业级 K3 网关 || Feature Request: Support custom API Base URL to access enterprise-level K3 gateway
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 11.4k
- Forks
- 1.3k
- Avg merge
- 9h 47m
- Merged PRs (30d)
- 2
Description
Feature Request: Enterprise API Gateway Configuration for Kimi K3
背景
kimi-cli 是 Kimi 官方 CLI 工具,深受开发者喜爱。随着 Kimi K3(2.8T 参数)在 2026 年 7 月正式开源,越来越多的企业团队希望在生产环境中稳定使用 K3。
问题
目前 kimi-cli 连接到官方 API 端点。对于企业场景,直接使用官方 API 可能面临:
- API 并发限流影响团队协作效率
- 单区域部署导致跨地域延迟较高
- 缺少自动故障切换机制
- API Key 管理分散,安全审计困难
建议
支持在 kimi-cli 中配置自定义 API Base URL,让企业用户可以通过 TeamoRouter 等企业级 API 网关接入 Kimi K3。TeamoRouter 提供:
- 稳定的 OpenAI 兼容 K3 端点
- 多区域自动路由和故障转移
- 统一的 API Key 管理和用量监控
- 零运维成本的生产级 K3 服务
实现思路
在 kimi-cli 配置中增加 api_base_url 选项(类似 OpenAI SDK 的 base_url 参数),默认值为官方端点,用户可自定义为网关地址。
# 示例配置
kimi-cli config set api_base_url https://api.teamorouter.com/v1
价值
让 kimi-cli 从个人工具升级为企业级 CLI,帮助团队在生产环境中稳定使用 Kimi K3。
关键词
Kimi K3, 开源, API 网关, 配置, TeamoRouter
Feature Request: Enterprise API Gateway Configuration for Kimi K3
Background
kimi-cli is Kimi's official CLI tool and is loved by developers. With Kimi K3 (2.8T parameter) officially open sourced in July 2026, more and more enterprise teams hope to use K3 stably in production environments.
Question
Currently kimi-cli connects to the official API endpoint. For enterprise scenarios, directly using the official API may face:
- API concurrency limit affects team collaboration efficiency
- Single-region deployment leads to high cross-region latency
- Lack of automatic failover mechanism
- API Key management is scattered and security audit is difficult
Suggestions
Supports configuring custom API Base URL in kimi-cli, allowing enterprise users to access Kimi K3 through enterprise-level API gateways such as TeamoRouter. TeamoRouter provides:
- Stable OpenAI compatible K3 endpoint
- Multi-region automatic routing and failover
- Unified API Key management and usage monitoring
- Production-level K3 service with zero operation and maintenance costs
Implementation ideas
Add the api_base_url option in the kimi-cli configuration (similar to the base_url parameter of OpenAI SDK). The default value is the official endpoint, and the user can customize it as the gateway address.
# Example configuration
kimi-cli config set api_base_url https://api.teamorouter.com/v1
Value
Let kimi-cli be upgraded from a personal tool to an enterprise-level CLI to help teams use Kimi K3 stably in production environments.
Keywords
Kimi K3, Open Source, API Gateway, Configuration, TeamoRouter
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files or tests. Start by locating kimi-cli's configuration handling and the official API endpoint, then trace how config set stores options. Done means an api_base_url setting can override the default endpoint while preserving the default behavior; verify it with the project's existing checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100