mirror of
https://github.com/MoonshotAI/kimi-code.git
synced 2026-07-09 17:29:12 +00:00
* feat: define model via KIMI_MODEL_* environment variables Add a KIMI_MODEL_* environment-variable channel that synthesizes a provider (__kimi_env__) and model alias (__kimi_env_model__) in memory and selects it as the default model, without editing config.toml. Supports provider type (kimi/anthropic/openai), base URL, API key, context size, capabilities, anthropic max_output_size, openai reasoning_key, and full thinking settings. Runtime config reads go through a new loadRuntimeConfig wrapper; the config.toml write-back paths keep using readConfigFile so the synthesized model is never persisted back to disk. * feat: env-model defaults and friendly welcome model name - KIMI_MODEL_MAX_CONTEXT_SIZE defaults to 262144 (256K) when unset - KIMI_MODEL_CAPABILITIES defaults to image_in,thinking when unset - TUI welcome banner shows the model display name / id instead of the internal __kimi_env_model__ alias key * fix: never persist env model to config.toml; validate default_thinking - Strip the synthesized __kimi_env__ provider / __kimi_env_model__ model (and a default_model pointing at it) in writeConfigFile, so the env model and its shell API key cannot be persisted via a getConfig -> setConfig patch round-trip (e.g. running /login or /connect in env-model mode). - Reject a non-empty but unparseable KIMI_MODEL_DEFAULT_THINKING value (fail-fast) instead of silently keeping config.toml's existing default. * fix: preserve on-disk default_model when stripping env model; fix thinking docs - stripEnvModelConfig restores config.toml's default_model from raw instead of erasing it when the runtime default points at the env alias, so a real default_model survives a getConfig -> setConfig round-trip. - Correct KIMI_MODEL_DEFAULT_THINKING docs: unset follows the global default (Thinking on), not Off. * fix: restore env-injected fields to on-disk values in stripEnvModelConfig; update tests for thinking behavior |
||
|---|---|---|
| .. | ||
| .vitepress | ||
| en | ||
| media | ||
| public | ||
| zh | ||
| .gitignore | ||
| AGENTS.md | ||
| index.md | ||
| package.json | ||