> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lithosai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 在 omp 中使用 LithosAI

> 通过 OpenAI Chat Completions API，将 omp 直接接入 LithosAI。

## 开始之前

安装 omp CLI，在 [API Key](https://console.lithosai.cloud/keys?lang=zh) 页面创建 key，并在 [模型](https://console.lithosai.cloud/models?lang=zh) 页面选好模型。

<Steps>
  <Step title="设置 API key">
    把 key 设为环境变量：

    ```bash theme={null}
    export LITHOSAI_API_KEY="your-key"
    ```
  </Step>

  <Step title="配置 LithosAI">
    以下配置以 `moonshotai/Kimi-K3-fast` 为例。

    把配置添加到 `~/.omp/agent/models.yml`。保留已有的 provider，并按所用模型设置 token 上限。

    <Accordion title="omp 配置">
      ```yaml ~/.omp/agent/models.yml theme={null}
      providers:
        lithosai:
          baseUrl: https://api.lithosai.cloud/v1
          api: openai-completions
          apiKey: LITHOSAI_API_KEY
          models:
          - id: moonshotai/Kimi-K3-fast
            name: moonshotai/Kimi-K3-fast
            reasoning: true
            thinking:
              mode: effort
              efforts:
              - low
              - high
              - max
              defaultLevel: high
              effortMap:
                low: low
                high: high
                max: max
            contextWindow: 65536
            maxTokens: 4096
            compat:
              supportsReasoningEffort: true
              thinkingFormat: openai
              maxTokensField: max_tokens
              reasoningEffortMap:
                low: low
                high: high
                max: max
      ```
    </Accordion>

    要添加其他模型或速度档位，复制 `providers.lithosai.models` 中的条目，把 `id` 和 `name` 设为[模型目录](https://console.lithosai.cloud/models?lang=zh)中的模型 ID，并按该模型调整 `contextWindow` 和 `maxTokens`。重新打开 omp 使配置生效。
  </Step>

  <Step title="开始对话">
    运行以下命令：

    ```bash theme={null}
    omp --provider lithosai --model moonshotai/Kimi-K3-fast --thinking high
    ```
  </Step>
</Steps>

## 模型与推理强度

* **当前模型与速度档位**：使用 `/switch lithosai/<model-id>:high`。
* **默认模型**：使用 `/model`。
* **推理强度**：按 **Shift+Tab** 选择 **low**、**high** 或 **max**。

所有 Agent 通用的问题见[常见问题](/zh/agent-integrations#常见问题)。

## 参考资料

* [omp 文档](https://github.com/can1357/oh-my-pi/blob/main/docs/models.md)
* [LithosAI 模型](https://console.lithosai.cloud/models?lang=zh)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.