> ## 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.

# 在 Cline 中使用 LithosAI

> 通过 OpenAI 兼容 provider，把 Cline 直接接入 LithosAI。

## 开始之前

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

<Steps>
  <Step title="配置 LithosAI">
    运行 `cline auth`，选择 **OpenAI Compatible**，然后填写：

    | 设置项 | 值 |
    | - | - |
    | Base URL | `https://api.lithosai.cloud/v1` |
    | API key | 你的 LithosAI API key |
    | Model ID | [模型](https://console.lithosai.cloud/models?lang=zh) 页面中的完整 ID，例如 `moonshotai/Kimi-K3-fast` |

    下面的示例使用 `moonshotai/Kimi-K3-fast`。把它换成你选的模型 ID，并按该模型调整 token 上限和支持的推理设置。

    <Accordion title="可选：编辑 provider 设置">
      编辑 `cline auth` 生成的记录，保留其他 provider 以及 `updatedAt` 和 `tokenSource`。API key 注意保密，token 上限按你的模型设置。

      ```json <data-dir>/settings/providers.json theme={null}
      {
        "version": 1,
        "lastUsedProvider": "openai-compatible",
        "modes": {},
        "providers": {
          "openai-compatible": {
            "settings": {
              "provider": "openai-compatible",
              "apiKey": "your-key",
              "model": "moonshotai/Kimi-K3-fast",
              "baseUrl": "https://api.lithosai.cloud/v1",
              "protocol": "openai-chat",
              "client": "openai-compatible",
              "reasoning": {
                "enabled": true,
                "effort": "high"
              },
              "capabilities": [
                "reasoning",
                "streaming",
                "tools"
              ],
              "contextWindow": 65536,
              "maxTokens": 4096
            },
            "updatedAt": "2026-09-29T00:00:00.000Z",
            "tokenSource": "manual"
          }
        }
      }
      ```
    </Accordion>
  </Step>

  <Step title="开始对话">
    ```bash theme={null}
    cline --tui --provider openai-compatible \
      --model moonshotai/Kimi-K3-fast --thinking high --auto-approve false
    ```

    在同一个对话里，用 `/model` 切换模型或速度档位。
  </Step>
</Steps>

## 推理强度

启动或恢复 Cline 时，使用 `--thinking low` 或 `--thinking high`。不支持 `max`。

<Accordion title="恢复对话时设置推理强度">
  ```bash theme={null}
  cline --tui --id SESSION_ID --provider openai-compatible \
    --model moonshotai/Kimi-K3-fast --thinking low --auto-approve false
  ```

  `SESSION_ID` 可以从 `cline history` 获取。如果你用了 `--data-dir`，要保持同一个目录。
</Accordion>

`/model` 会重置启动时选择的推理强度。

所有 Agent 都会遇到的问题见[常见问题](/zh/agent-integrations#常见问题)。

## 参考资料

* [Cline 文档](https://docs.cline.bot/cli/cli-reference)
* [LithosAI 模型列表](https://console.lithosai.cloud/models?lang=zh)


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