新增 Go Codex HTTP 网关和独立 worker #1
Reference in New Issue
Block a user
Delete Branch "codex/initial-gateway"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
目标
提供可独立部署的 Go 网关。客户端以 OpenAI Chat Completions 格式提交文本请求,用我们签发的 Bearer key 鉴权,由单独容器里的 Codex CLI 生成结果。
实现
POST /v1/chat/completions使用model=codex。网关验证 SHA-256 key 哈希后才通过 Unix socket 调用 worker。限制
首版提供非流式文本。真实账号请求和公网 TLS 验收要在绑定 worker 账号并配置 HTTPS 入口后执行。此 PR 交付代码和部署配置,部署在合并后单独进行。
验证
ces-control通过go test -race ./...、go vet ./...、docker compose config、网关和 worker 镜像构建,以及容器中的 Codex CLI0.172.0版本检查。