如何在Codex CLI中使用Particle AI: Particle-1?
particle-ai/particle-1Codex CLI 通过 UberLLM 的 Responses API 访问Particle AI: Particle-1。在~/.codex/config.toml中,添加一个模型提供商,将base_url设置为https://api.uberllm.dev/v1和wire_api = "responses",将您的 UberLLM 密钥放入UBERLLM_API_KEY环境变量中,并将model设置为particle-ai/particle-1。 model_context_window被设置为1,048,576,即Particle AI: Particle-1的上下文大小,因为 Codex 对它所知的 OpenAI 模型列表之外的模型假定为272,000个 token。
model = "particle-ai/particle-1"
model_provider = "uberllm"
model_context_window = 1048576
web_search = "disabled"
[model_providers.uberllm]
name = "UberLLM"
base_url = "https://api.uberllm.dev/v1"
env_key = "UBERLLM_API_KEY"
wire_api = "responses"Codex CLI 调用:OpenAI Responses API https://api.uberllm.dev/v1/responses · 完整的Codex CLI指南
把 ull_your_key 换成你的 UberLLM API 密钥。一个密钥可用于所有工具和所有模型。
通过 API,Particle AI: Particle-1 在三个地址上响应,使用相同的 UberLLM 密钥和模型 ID particle-ai/particle-1:位于https://api.uberllm.dev/v1/chat/completions的 OpenAI 聊天补全、位于https://api.uberllm.dev/v1/responses的 OpenAI Responses API 以及位于https://api.uberllm.dev/v1/messages的 Anthropic Messages API。