跳转到正文

在 Codex 中使用开放模型

RightNow AIOpen models在 Codex 中使用开放模型 更新于

本页内容

默认情况下,开放模型有自己的 codex-run 命令。你的 codex 命令和设置保持不变。

设置之后
Text
设置把开放模型放在 Codex 中什么位置的示意图。

设置后会有两个并列的命令。codex 是你原来的命令,它的设置保持不变。codex-run 是新命令:开放模型有了自己的命令。

设置

agent-prompt.md
Text
Set up the open-models service in this coding agent for me. Read https://www.rightnowai.co/docs/open-models/guides/coding-agents.md and follow it step by step. If you cannot open links, run `npx -y @runinfra/cli@latest --help` and follow its FOR CODING AGENTS section. I approve sign-in in my browser. Before you install anything, change this agent's settings or spend money, show me the plan and wait for my yes.
  1. 粘贴提示

    粘贴到你的智能体的聊天中。

  2. 批准登录

    打开你的智能体给出的链接,输入代码,然后选择 Approve。只批准你自己的智能体刚刚显示的代码。

  3. 同意计划

    你的智能体会说明它将更改什么,以及谁为一次简短的付费检查付费。

逐步设置。

当 Codex 询问时,批准在沙箱外运行 runinfra。

要在 codex 本身中使用开放模型,请在终端运行 runinfra 并选择 Inside;在你断开之前,它会一直使用开放模型。

每一步请参阅设置编程智能体。

启动

启动
运行你的智能体给出的那一行。
模型
开放模型已经选好。
PATH
如有需要,把 ~/.config/runinfra/bin 加入 PATH(Windows 上是 %LOCALAPPDATA%\runinfra\bin),以便按名称运行命令。
如果失败
CLI 故障排除

撤销

让你平常使用的 codex 智能体断开开放模型。这会删除 codex-run 及其会话和历史,或恢复 Inside 的先前设置。