OcHub manages Kimi Code as a current-connection tool. Each OcHub connection is
a complete provider-and-model profile. Switching writes the selected profile to
~/.kimi-code/config.toml, updates default_provider and default_model, and
keeps unrelated top-level Kimi Code settings intact.
Add a connection
- Open Kimi Code in the OcHub sidebar and select Add connection.
- Enter a stable Provider ID. Models reference this value through their
providerfield. - Select the protocol used by the upstream: OpenAI Chat Completions, OpenAI Responses, Anthropic Messages, Kimi, Google GenAI, or Vertex AI.
- Enter the Base URL and API key required by that provider.
- Add at least one model. Each row needs a unique alias, upstream model ID, and positive context-window size. Output limit, display name, and capabilities are optional.
- Set Default model alias to one of the aliases in the model table.
- Review the
config.tomlpreview, save, and select Switch.
Capabilities are comma-separated identifiers such as thinking, tool_use,
and image_in. Custom headers are sent with provider requests. Credential
environment mappings are written under the provider’s env table; they do not
modify the shell environment.
Existing configuration
When Kimi Code already has a valid active provider, OcHub can discover it as a connection. The imported profile contains that provider and the models that reference it. Comments and unrelated sections are preserved when OcHub writes the selected profile, while stale provider/model entries from the previously managed profile are replaced.
Back up config.toml before the first switch if it contains hand-written
provider layouts that you want to retain. Kimi Code support does not currently
include MCP or skill synchronization.
Verify
After switching, restart Kimi Code, confirm the expected model is selected, and
send a short request. If it still uses an old endpoint, verify that OcHub and
Kimi Code resolve the same home directory and that default_provider and
default_model point to entries present in the generated file.

