npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@wacry/codeks-bridge

v0.0.25

Published

Configurable local Responses API bridge for codeks with GPT, Claude Messages, DeepSeek Chat, and native Gemini adapters.

Readme

codeks-bridge

给 codeks 使用的本地模型桥接器。一个 Responses provider 可接入多个 GPT、Claude Messages、DeepSeek Chat 和 Gemini 原生上游,支持工具、图片、流式回答和跨模型会话。

项目维护一份有限的模型目录。GPT 优先以 Codex 源码中各自的条目为基础,源码尚未收录的模型使用已审阅的订阅目录快照;第三方模型采用经精调的现代模板。客户端使用 Responses Lite,工具模式和多代理设置保留各模型差异;配置可分别指定模型别名、目录条目和真实部署名。

安装和使用

需要 Node.js ≥ 20.19 和已安装的 codeks。

npm install -g @wacry/codeks-bridge

把示例配置复制到仓库外,填写端点与 API key 环境变量,保留需要的模型。catalog 选择受支持的模型,upstream 选择连接,model 是实际发给上游的部署名;窗口与参数可以覆盖目录默认值。

GPT 也可使用 ChatGPT 订阅:先运行 codex login(已有文件登录可直接复用),再给连接设置 "auth": { "type": "chatgpt" }。bridge 自动读取登录凭据和账号 ID、刷新 token,订阅端点可省略。见订阅配置和ChatGPT+Claude 示例。

codeks-bridge serve --config /absolute/path/bridge.json

另一个终端生成客户端配置:

codeks-bridge config-snippet --config /absolute/path/bridge.json

将输出合并到 codeks 的 config.toml,顶层配置放在表定义前,替换已有同名项。codeks 会从 bridge 的 /v1/models 读取公开模型的完整目录,然后可按配置中的别名选择模型。visibility: "hide" 在选择器中隐藏但保留完整元数据;内部专用预设可设 expose: false,从目录中省略。已有 model_catalog_json 会优先使用本地文件;迁移到 HTTP 目录时应移除它。修改 bridge 配置后重启服务。

使用边界

  • 普通模型错误保留原始详情交给客户端决定重试;ChatGPT 订阅 HTTP 401 最多进行一次鉴权恢复并重发。bridge 不自动换端点或更换压缩方式。
  • bridge 封装的 reasoning 默认只回放给原目标,原生压缩与 reasoning 的跨目标复用分别配置。无法识别的历史状态默认透传,也可配置过滤或报错;实际兼容性由上游决定。
  • GPT 默认使用 compaction.mode: "native":先做原生加密压缩,需要文字表示时再向原来源复述并缓存。其他模型默认使用标准文字压缩,也可通过 compaction.model 委托常用 GPT 执行原生压缩,直接复用已有模型配置;见 GPT+Claude 双模型示例。
  • 历史由 codeks 保存;按需复述的成功结果另存本地缓存。封装只是编码,文字 reasoning、摘要及复述配方可读。
  • Lark/regex 转为工具描述约束。配置 "web_search": { "upstream": "chatgpt" } 后,所有模型可共用订阅搜索。
  • 配置 "image_generation": { "upstream": "chatgpt" } 后,支持图片输入的模型可共用图片生成与编辑。codeks 客户端还需已登录 ChatGPT。

调试

serve 加 --capture 后打开日志里的 /inspect/ 地址,可以逐条查看 codeks 请求、发往上游的请求、上游原始响应和写回 codeks 的响应,以及 reasoning 与压缩状态的回放决定。记录只在内存中,也可以在页面上开关捕获、清空或导出。详见调试检查器。

配置与模型目录 · 嵌入现有服务 · 整体设计 · Reasoning · 压缩 · 工具 · 订阅搜索 · 图片生成 · 调试检查器 · 验证 · 发布