Docs · Guide
Kun on any model
Kun (KunAgent) is a local-first AI workbench: a desktop app (Code, Work, chats, agents) and a kun TUI, both clients of one runtime, kun serve. Its models come from the runtime's model connections. packinggoods adds a connection of its own and makes it the default, so Kun runs on any model in packinggoods: DeepSeek, GLM, Kimi, Qwen, Claude or a ChatGPT subscription, in the desktop app and the TUI alike.
Set up Kun
- Add a provider in packinggoodsAdd an API key on the Providers page, or sign in to a subscription.
- Open Kunpackinggoods adds its connection through the running Kun, as below.
- Pick a model for Kun on the Agents pagePick a model via packinggoods; it becomes Kun's default.
packinggoods kun deepseek/deepseek-v4-pro
Through Kun's own API
Kun keeps its connections in model-connections.v2.json in its data folder ($KUN_DATA_DIR, else ~/.kun/data), and a connection's key in its protected credential store, so a connection can't be written into a file by hand. packinggoods adds and removes its connection as Kun's own Settings › Providers and its kun provider command do, through the runtime's admin API:
GET /v1/model-connections the connections, with a revision POST /v1/model-connections/connect packinggoods's connection PATCH /v1/model-connections/packinggoods its model list POST /v1/model-connections/select Kun's default model DELETE /v1/model-connections/packinggoods switching back
The address and token come from runtime.json in the data folder. packinggoods's connection, packinggoods, is an HTTP one at the gateway's /v1, spoken to as Chat Completions with packinggoods's own key for Kun. packinggoods remembers its id, so one you renamed to packinggoods-2 in Kun is still packinggoods's.
The model list
The connection's models are the ones you tick for Kun on packinggoods's Agents page, at most 500. A model picked or dropped there reaches the connection, and so does a gateway on a new port.
Kun has to be running
Kun adds and changes model providers only while it runs. When it isn't running, packinggoods says to open Kun, then try again.
Switching back
packinggoods stashes the default Kun had when it first steps in. Switching back picks that default again, then removes packinggoods's connection. With no provider of your own in Kun to go back to, packinggoods asks you to add one in Kun's Settings › Providers.
packinggoods kun default
FAQ
Can Kun run on DeepSeek, GLM or a ChatGPT subscription?
Yes. Open Kun and pick a via-packinggoods model for Kun on packinggoods's Agents page. packinggoods adds a packinggoods model connection and makes it the default.
packinggoods says open Kun, then try again. Why?
Kun takes provider changes only while it runs. Open the Kun desktop app or kun serve, and try again.
Does the kun TUI get the models too?
Yes. The desktop app and the kun TUI are both clients of kun serve and share its model connections.
Does switching back restore my default model?
Yes. packinggoods stashed the default Kun had, picks it again, then removes its connection.
More desktop apps on the same models: OpenHanako on any model, DS Bot on any model, Tuanjie Cowork on any model and Alma on any model. Something fails? See Fixing common errors, or ask on Discord.