Repository navigation
[PR] docs: opencodex (ocx) as upstream gateway — verified recipe - #5829
ranxianglei wants to merge 1 commit into
Conversation
Verified zero-code chain client -> bili -> ocx -> model over all three wires (OpenAI Chat / Responses / Anthropic Messages) on 2026-11-06, bili 0.1.212 x ocx 2.97.0. Closes #5818
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.8394-pr.5829.511c5afThis exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr5829.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复。 镜像与 GitHub 的 open/closed issues+PRs 均检索过(opencodex / ocx / gateway):唯一相关条目就是本 PR。来源线程 = Discussion #5818(「Can billion-context be integrated with opencodex?」——经 GraphQL 确认存在;REST 标签: Review 结论(PR #5829:docs only,单 commit,README.md / README.zh-CN.md 各 +2 行)① 原 issue 方向:成立。来源是 Discussion #5818 问两项目能否结合,ocx 侧(lidge-jun/opencodex discussion #6320)也有同向需求。「不需要代码」的结论正确:ocx 数据面就是普通的 OpenAI/Anthropic 兼容端点,bili 既有 ② 回归审查:不涉及——未触碰任何代码路径,既有行为清单为空。 ③ 内容事实核查(逐项独立对照两个仓库,非照抄 PR 声明):
④ 测试有效性:docs-only 无需测试;PR 声明的 live hermetic 链路实测(client → bili → ocx,三条线含流式 + 会话跟踪/注入观测)与上游文档常量自洽,以上为独立交叉核对结果。 ⑤ diff 整洁度:4 行新增、单 commit、base 即当前 master head、mergeable=true、无无关改动 ✓ CI:全绿——47 项 check 全部 success/skipped(e2e 车道按门控设计跳过),无失败。 八问
判定:可合并。 内容事实逐项成立、CI 绿、diff 最小。唯一小注(无需改):"Closes #5818" 指向 Discussion,Closes 关键字对 discussion 无自动关闭效果,但引用对象本身正确。 |
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
查重:不重复 — full-text search across open+closed issues/PRs ("opencodex"/"ocx", GitHub + local tracker): the only related pre-existing item is the question thread itself (cyrus109's "[Ideas] Can billion-context be integrated with opencodex?", still open); no other PR/issue carries this recipe and no ocx entry exists in README/CLIENTS.md yet. This PR is the sole implementation of that request.
Verdict: APPROVE (posted as a comment review — GitHub rejects approve events on a PR authored by the same account) — docs-only change (README.md + README.zh-CN.md, +4/-0); every factual claim independently verified against both repos' current documentation.
Structured eight questions:
- What problem: answers "can bili and opencodex (ocx) be combined?" with a verified recipe — client → bili → ocx through the
/bili/<absolute-url>prefix. - Root cause: n/a — docs addition answering a user question ([Ideas] thread above); demand also visible in lidge-jun/opencodex discussion #6320.
- Impact scope / severity: zero runtime surface — no code/config/wire/persistence changes; only readers of the two READMEs are affected.
- How fixed: one FAQ entry each in en/zh placed next to the existing magpie gateway entry (same bold-question format), reusing the established
/bili/pattern; states why bili goes IN FRONT of ocx (pool semantics live at ocx's final hop). - Regression audit: existing behavior audited = the two FAQ sections' insertion points and surrounding text — the diff touches exactly two added paragraphs plus blank lines (verified at branch head), no other line changed; zh/en kept in sync (§7.3); no headings/anchors added so TOC unaffected; no config/wire/kernel/version fields touched. No regressions.
- Cache impact: n/a (no runtime path touched).
- Design direction: unchanged.
- New config introduced: none (body declares "Config surface: None").
Independent fact-check (not taken from the PR body):
- ocx default bind
127.0.0.1:10100; OpenAI basehttp://localhost:10100/v1, Anthropic basehttp://localhost:10100— matches lidge-jun/opencodex README (current main). - non-loopback bind requires
OPENCODEX_API_AUTH_TOKEN+x-opencodex-api-keyheader — matches ocx README. provider/modelrouting id syntax — matches ocx README.- all three wires accepted by ocx (Responses / Chat Completions / Anthropic Messages) — matches ocx README.
- version pins are real: bili tag
v0.1.212exists (= current masterpackage.json0.1.212); ocxv2.97.0released 2026-11-03, before the stated 2026-11-06 verification date. - cross-references (
models.<name>.context,KEY SWITCHESin/acp-cache, dummy key riding through untouched) consistent with the adjacent magpie entry and README Option 3.
Findings:
- [non-blocking] dead
Closes #5818ref in the PR body.#5818does not exist on GitHub (404; neighboring numbers 5805–5828 scanned — none is this topic). The actual question thread is cyrus109's open "[Ideas] Can billion-context be integrated with opencodex?", which currently has no GitHub-side twin. Effect: auto-close will not fire and the traceability pointer is wrong. Suggest correcting the body line before merge to cite the real question thread (or drop the Closes line and keep the discussion #6320 citation already in the Why section). Reviewers cannot edit the PR body, so leaving this to the author. - [optional observation, no action required] "watch
KEY SWITCHESin/acp-cache" for mid-session account rebinds: the #2131 key-switch fingerprint watches bili's outbound credential, which stays constant here (dummy/none toward loopback ocx), so an ocx-side rotation is more likely to surface as unexplained stable-prefix misses than as a KEY SWITCHES event. The phrasing mirrors the merged magpie entry's intent, so consistency argues for keeping it; noted for owner awareness only.
CI: static-gates green (ubuntu/windows); test shards in progress at last mirror-cache read, lane reports head green. No small findings requiring branch fixes (all claims verified true, zh/en in sync, formatting consistent) → no fix commits pushed.
PR #5829(ocx 网关 FAQ 文档)review 完成:已发 APPROVE 结论(以 comment review 形式,GitHub 禁止同账号 approve 自己的 PR)——docs-only +4/-0,全部外部事实逐项对照 lidge-jun/opencodex README 核实无误,zh/en 同步、格式与相邻 magpie 条目一致;唯一非阻塞发现:PR 正文 |
|
(ai: sglang-gpu0/qwen3.8-27b) |
Closes #5818
What
One FAQ entry each in README.md / README.zh-CN.md, next to the existing magpie gateway entry: how to run opencodex (
ocx) — the local Codex/Claude Code gateway with a ChatGPT account pool — as bili's upstream. Docs only; no code or config changes.Why
#5818 asked whether the two projects can be combined; lidge-jun/opencodex discussion #6320 shows demand for exactly this from their side. Research conclusion: no code is needed. ocx's data plane is an ordinary OpenAI/Anthropic-compatible endpoint whose default loopback bind reads no token, so bili's existing
/bili/gateway pattern covers it — with bili IN FRONT (client → bili → ocx → model): session identity stays clean on the client-facing hop, and ocx keeps ownership of provider credentials and account pooling at its final hop. The reverse order loses the pool semantics.Verification (live hermetic chain, 2026-11-06)
client → bili 0.1.212 → ocx 2.97.0 (
ocx start, mock OpenAI upstream behind it):responseobjectmessageobject (ocx cross-wires to its provider adapter)Config surface
None — docs only.