手动设置 Codex
自己动手让 Codex 使用 bInference 并连接 Binance。同样适用于 Codex 和 ChatGPT 桌面应用。
快捷方式
npx binference agent-os my-agent --app codex
会在一个文件夹中设置好这里的一切,并带上交易限制、提醒和驾驶舱。参见设置
Agent。本页介绍如何手动设置 Codex,没有驾驶舱的限制和刹车。
让 Codex 使用 bInference
Codex 使用 Responses 格式。把 bInference 添加为模型提供方:
model_provider = "binference"
model = "openai/gpt-6.1-sol"
web_search = "disabled"
[model_providers.binference]
name = "bInference"
base_url = "https://binference.io/api/v1"
env_key = "BINF_API_KEY"
wire_api = "responses"模型页面中的任何模型都可以作为 model。这里不提供 Codex 内置的图片工具:bInference 会把它从每个请求中去掉,其他功能照常使用。Codex 还会在每次调用中提供联网搜索,而且不限制一次调用能搜索多少次,所以 bInference 必须在调用开始前预留多轮搜索的费用(即使是小模型也超过 $10)。web_search = "disabled" 能让每次调用的预留保持很小;如果额度充足,你也可以保持开启。
添加 Binance MCP Server
原样运行 Binance 提供的命令,浏览器打开后完成身份验证:
codex mcp add binance-mcp-server --url https://agent.binance.com/mcp/agentic --oauth-client-id codex只授予你需要的最少权限范围:市场数据、账户、交易或转账。没有提现权限。Codex 和 ChatGPT 桌面应用会使用同一个连接。
检查连接,然后为子账户充值
问 Codex:
Use the Binance MCP Server to show the current BTCUSDT price and 24-hour change.然后在 binance.com 上转入交易资金:Profile → Dashboard → Sub-account → Asset Management → Transfer。只有你能给 Agentic 子账户充值,而且它一开始是空的。