Kizuki
    Preparing search index...

    Function writeSettings

    • Checks and saves the settings. Writes to a temporary file first so a crash never leaves half a file.

      Parameters

      • home: string
      • settings: {
            chat: {
                apiKeyEnv?: string;
                baseURL: string;
                model: string;
                provider: "openai-compatible" | "gateway";
                reasoning: "none" | "default";
                replyShape: "server" | "prompt";
            };
            embed: {
                apiKeyEnv?: string;
                baseURL: string;
                model: string;
                provider: "openai-compatible"
                | "gateway";
            };
            sendOutAllowed: boolean;
        }
        • chat: {
              apiKeyEnv?: string;
              baseURL: string;
              model: string;
              provider: "openai-compatible" | "gateway";
              reasoning: "none" | "default";
              replyShape: "server" | "prompt";
          }
          • OptionalapiKeyEnv?: string

            The name of the environment variable that holds the API key. The key itself is never saved.

          • baseURL: string
          • model: string
          • provider: "openai-compatible" | "gateway"

            How Kizuki talks to a model server. openai-compatible: any server that speaks the OpenAI format, such as Ollama and MLX. gateway: Vercel AI Gateway, through the AI SDK's own gateway provider.

          • reasoning: "none" | "default"

            none turns thinking off, which is faster on small local models. default leaves it to the model.

          • replyShape: "server" | "prompt"

            How replies are kept in the right shape. server: the server enforces it (Ollama, OpenAI). prompt: Kizuki describes the shape in the prompt and checks the reply itself, for servers that ignore it (MLX).

        • embed: {
              apiKeyEnv?: string;
              baseURL: string;
              model: string;
              provider: "openai-compatible" | "gateway";
          }
          • OptionalapiKeyEnv?: string
          • baseURL: string
          • model: string
          • provider: "openai-compatible" | "gateway"

            How Kizuki talks to a model server. openai-compatible: any server that speaks the OpenAI format, such as Ollama and MLX. gateway: Vercel AI Gateway, through the AI SDK's own gateway provider.

        • sendOutAllowed: boolean

          True once you agreed to send your material to a model off this computer. Settings that send it out can't be saved without it.

      Returns Promise<void>