跳到主要内容

OpenRouter

OpenHands 使用 LiteLLM 来调用 OpenRouter 上的聊天模型。您可以在这里找到关于使用 OpenRouter 作为提供商的文档。

配置

运行 OpenHands 时,您需要在 OpenHands UI 的设置中设置以下内容:

  • LLM Provider 设置为 OpenRouter
  • LLM Model 设置为您将使用的模型。 访问此处查看 OpenRouter 模型的完整列表。 如果模型不在列表中,切换到 Advanced 选项,并在 Custom Model 中输入(例如 openrouter/<model-name> 如 openrouter/anthropic/claude-3.5-sonnet)。
  • API Key 设置为您的 OpenRouter API 密钥。