@vibeapi/api-helper 0.0.182 → 0.0.183

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -50,6 +50,9 @@
50
50
  "video": false,
51
51
  "vision": true
52
52
  },
53
+ "clients": {
54
+ "codex": false
55
+ },
53
56
  "context_window": 1000000,
54
57
  "description": "100 万上下文 | 长时 Agent 编程 | 知识工作",
55
58
  "endpoint_types": [
@@ -89,6 +92,9 @@
89
92
  "video": false,
90
93
  "vision": true
91
94
  },
95
+ "clients": {
96
+ "codex": false
97
+ },
92
98
  "context_window": 1000000,
93
99
  "description": "100 万上下文 | Agent 编程 | 速度与成本均衡",
94
100
  "endpoint_types": [
@@ -128,6 +134,9 @@
128
134
  "video": false,
129
135
  "vision": true
130
136
  },
137
+ "clients": {
138
+ "codex": false
139
+ },
131
140
  "context_window": 1000000,
132
141
  "description": "100 万上下文 | 高难度推理 | 长时 Agent 与多步研究",
133
142
  "endpoint_types": [
@@ -168,6 +177,9 @@
168
177
  "video": false,
169
178
  "vision": true
170
179
  },
180
+ "clients": {
181
+ "codex": false
182
+ },
171
183
  "context_window": 1000000,
172
184
  "description": "100 万上下文 | 长时 Agent 与多步研究",
173
185
  "endpoint_types": [
@@ -207,6 +219,9 @@
207
219
  "video": false,
208
220
  "vision": true
209
221
  },
222
+ "clients": {
223
+ "codex": false
224
+ },
210
225
  "context_window": 1000000,
211
226
  "description": "100 万上下文 | 高强度推理 | 长时 Agent",
212
227
  "endpoint_types": [
@@ -246,6 +261,9 @@
246
261
  "video": false,
247
262
  "vision": true
248
263
  },
264
+ "clients": {
265
+ "codex": false
266
+ },
249
267
  "context_window": 1000000,
250
268
  "description": "100 万上下文 | Agent 编程",
251
269
  "endpoint_types": [
@@ -285,6 +303,9 @@
285
303
  "video": false,
286
304
  "vision": true
287
305
  },
306
+ "clients": {
307
+ "codex": false
308
+ },
288
309
  "context_window": 1000000,
289
310
  "description": "100 万上下文 | Agent 编程 | 工具调用",
290
311
  "endpoint_types": [
@@ -324,6 +345,9 @@
324
345
  "video": false,
325
346
  "vision": true
326
347
  },
348
+ "clients": {
349
+ "codex": false
350
+ },
327
351
  "context_window": 1000000,
328
352
  "description": "100 万上下文 | 推理 | 编程",
329
353
  "endpoint_types": [
@@ -363,6 +387,9 @@
363
387
  "video": false,
364
388
  "vision": true
365
389
  },
390
+ "clients": {
391
+ "codex": false
392
+ },
366
393
  "context_window": 1000000,
367
394
  "description": "100 万上下文 | 推理 | 编程",
368
395
  "endpoint_types": [
@@ -401,6 +428,9 @@
401
428
  "video": false,
402
429
  "vision": true
403
430
  },
431
+ "clients": {
432
+ "codex": false
433
+ },
404
434
  "context_window": 200000,
405
435
  "description": "20 万上下文(部分分组无 1M)| 推理 | 编程",
406
436
  "endpoint_types": [
@@ -439,6 +469,9 @@
439
469
  "video": false,
440
470
  "vision": true
441
471
  },
472
+ "clients": {
473
+ "codex": false
474
+ },
442
475
  "context_window": 200000,
443
476
  "description": "20 万上下文(部分分组无 1M)| Agent 编程",
444
477
  "endpoint_types": [
@@ -2135,7 +2168,7 @@
2135
2168
  "tool": "gemini"
2136
2169
  }
2137
2170
  ],
2138
- "revision": "2026-11-11T08:32:41Z-17",
2171
+ "revision": "2026-11-16T16:50:03Z-1",
2139
2172
  "schema": 1,
2140
2173
  "tools": {
2141
2174
  "claude": {
@@ -50,6 +50,9 @@
50
50
  "video": false,
51
51
  "vision": true
52
52
  },
53
+ "clients": {
54
+ "codex": false
55
+ },
53
56
  "context_window": 1000000,
54
57
  "description": "100 万上下文 | 长时 Agent 编程 | 知识工作",
55
58
  "endpoint_types": [
@@ -89,6 +92,9 @@
89
92
  "video": false,
90
93
  "vision": true
91
94
  },
95
+ "clients": {
96
+ "codex": false
97
+ },
92
98
  "context_window": 1000000,
93
99
  "description": "100 万上下文 | Agent 编程 | 速度与成本均衡",
94
100
  "endpoint_types": [
@@ -128,6 +134,9 @@
128
134
  "video": false,
129
135
  "vision": true
130
136
  },
137
+ "clients": {
138
+ "codex": false
139
+ },
131
140
  "context_window": 1000000,
132
141
  "description": "100 万上下文 | 高难度推理 | 长时 Agent 与多步研究",
133
142
  "endpoint_types": [
@@ -168,6 +177,9 @@
168
177
  "video": false,
169
178
  "vision": true
170
179
  },
180
+ "clients": {
181
+ "codex": false
182
+ },
171
183
  "context_window": 1000000,
172
184
  "description": "100 万上下文 | 长时 Agent 与多步研究",
173
185
  "endpoint_types": [
@@ -207,6 +219,9 @@
207
219
  "video": false,
208
220
  "vision": true
209
221
  },
222
+ "clients": {
223
+ "codex": false
224
+ },
210
225
  "context_window": 1000000,
211
226
  "description": "100 万上下文 | 高强度推理 | 长时 Agent",
212
227
  "endpoint_types": [
@@ -246,6 +261,9 @@
246
261
  "video": false,
247
262
  "vision": true
248
263
  },
264
+ "clients": {
265
+ "codex": false
266
+ },
249
267
  "context_window": 1000000,
250
268
  "description": "100 万上下文 | Agent 编程",
251
269
  "endpoint_types": [
@@ -285,6 +303,9 @@
285
303
  "video": false,
286
304
  "vision": true
287
305
  },
306
+ "clients": {
307
+ "codex": false
308
+ },
288
309
  "context_window": 1000000,
289
310
  "description": "100 万上下文 | Agent 编程 | 工具调用",
290
311
  "endpoint_types": [
@@ -324,6 +345,9 @@
324
345
  "video": false,
325
346
  "vision": true
326
347
  },
348
+ "clients": {
349
+ "codex": false
350
+ },
327
351
  "context_window": 1000000,
328
352
  "description": "100 万上下文 | 推理 | 编程",
329
353
  "endpoint_types": [
@@ -363,6 +387,9 @@
363
387
  "video": false,
364
388
  "vision": true
365
389
  },
390
+ "clients": {
391
+ "codex": false
392
+ },
366
393
  "context_window": 1000000,
367
394
  "description": "100 万上下文 | 推理 | 编程",
368
395
  "endpoint_types": [
@@ -401,6 +428,9 @@
401
428
  "video": false,
402
429
  "vision": true
403
430
  },
431
+ "clients": {
432
+ "codex": false
433
+ },
404
434
  "context_window": 200000,
405
435
  "description": "20 万上下文(部分分组无 1M)| 推理 | 编程",
406
436
  "endpoint_types": [
@@ -439,6 +469,9 @@
439
469
  "video": false,
440
470
  "vision": true
441
471
  },
472
+ "clients": {
473
+ "codex": false
474
+ },
442
475
  "context_window": 200000,
443
476
  "description": "20 万上下文(部分分组无 1M)| Agent 编程",
444
477
  "endpoint_types": [
@@ -2135,7 +2168,7 @@
2135
2168
  "tool": "gemini"
2136
2169
  }
2137
2170
  ],
2138
- "revision": "2026-11-11T08:32:41Z-17",
2171
+ "revision": "2026-11-16T16:50:03Z-1",
2139
2172
  "schema": 1,
2140
2173
  "tools": {
2141
2174
  "claude": {
@@ -11,8 +11,7 @@ export declare function autoCompactTokens(window: number, explicit?: number): nu
11
11
  /**
12
12
  * The models to add for `tool`. When the gateway publishes its client config
13
13
  * (`/api/platform/vibecode/config`) its lists come first — fields it leaves out keep
14
- * the built-in values, and Claude models only come from it when `models.json` lists
15
- * them too (so a model removed there, like Haiku for Codex, stays out); Codex also
14
+ * the built-in values; Codex never gets Claude models (they belong to Claude Code and Claude Desktop); Codex also
16
15
  * gets the `gemini` list, Grok Build only the `grok` list. Built-in entries the lists lack are added (see
17
16
  * `withBuiltInExtras`); a `hidden` row on the gateway keeps one out. Without the
18
17
  * config, the built-in list from `models.json` → `gatewayModels`. When the key's owner chose
@@ -1 +1 @@
1
- import{getGatewayModelRules as e}from"./model-registry.js";export function autoCompactTokens(t,o){return o&&o>0?Math.min(o,t):Math.floor(t*e().autoCompactRatio)}export function gatewayModelSpecs(o,i,d=[]){const n=e().models,c=n.filter(e=>function(e,t){return"codebuddy"===e||("codex"===e?!1!==t.codex:"grok"===e?"grok"===modelFamily(t.id):!t.id.startsWith("claude-")&&!1!==t.claudeCode)}(o,e));if(!i)return c;const r=new Set(Object.values(i).flat().filter(e=>e.hidden).map(e=>e.id)),l=Object.fromEntries(Object.entries(i).map(([e,t])=>[e,t.filter(e=>!e.hidden)])),s=new Map;for(const e of Object.values(l).flat()){const t="codex"===o&&"gpt"===modelFamily(e.id)?void 0:e.clients?.[o];void 0===t||s.has(e.id)||s.set(e.id,t)}for(const[e,t]of s)t||r.add(e);const a=new Map(("claude-code"===o?n:c).map(e=>[e.id,e])),u=(l.gemini??[]).filter(e=>s.get(e.id)??!1!==n.find(t=>t.id===e.id)?.codex),m=("codebuddy"===o?[...l.claude??[],...l.codex??[],...l.gemini??[],...l.grok??[]]:"grok"===o?l.grok??[]:"codex"===o?[...l.codex??[],...u,...(l.claude??[]).filter(e=>e.id.startsWith("claude-")&&(s.get(e.id)??a.has(e.id)))]:function(e,t){return[...(e.codex??[]).filter(e=>"gpt"===modelFamily(e.id)),...e.gemini??[],...e.grok??[],...(e.claude??[]).filter(e=>!e.id.startsWith("claude-"))].filter(e=>e.clients?.["claude-code"]??t.get(e.id)?.claudeCode??!0)}(l,a)).filter(e=>!(e=>!1===s.get(e.id))(e));if(0===m.length)return c.filter(e=>!r.has(e.id));const f=new Set,g=[];for(const e of m){if(f.has(e.id))continue;f.add(e.id);const{clients:t,minClientVersion:o,rolloutPercent:i,...d}=e,n={...a.get(e.id),...d};void 0!==t?.codex&&(n.codex=t.codex),void 0!==t?.["claude-code"]&&(n.claudeCode=t["claude-code"]),g.push(n)}return t[o].some(e=>d.includes(e))?g:function(e,t,o){const i=[...e];return t.forEach((e,d)=>{if(o.has(e.id)||i.some(t=>t.id===e.id))return;const n=modelFamily(e.id),c=new Set(t.slice(d+1).filter(e=>modelFamily(e.id)===n).map(e=>e.id));let r=i.findIndex(e=>c.has(e.id));if(r<0){r=i.length;for(let e=i.length-1;e>=0;e--)if(modelFamily(i[e].id)===n){r=e+1;break}}i.splice(r,0,e)}),i}(g,c,r)}const t={grok:["grok"],codex:["codex","gemini","claude"],"claude-code":["codex","gemini","grok","claude"],codebuddy:["claude","codex","gemini","grok"]},o={gpt:"GPT",gemini:"Gemini",glm:"GLM",deepseek:"DeepSeek",minimax:"MiniMax",qwen:"Qwen"};export function modelBlurb(e,t={}){const o=[];for(const i of(e??"").split("|")){const e=i.trim();e&&(/\d\s*万?\s*输出|output\D*\d|\d\D*output/i.test(e)||(/[\d百千]\s*万?\s*上下文|context\D*\d|\d\D*context/i.test(e)?t.millionContext&&!o.includes("百万上下文")&&o.unshift("百万上下文"):o.push(e)))}return t.millionContext&&!o.includes("百万上下文")&&o.unshift("百万上下文"),o.length>0?o.join(" | "):void 0}export function prettyModelName(e){const t=e.replace(/^([a-z]+)(\d)/i,"$1 $2").split(/[-_\s]+/).filter(Boolean),i=[];for(const e of t){const t=i[i.length-1];if(/^\d+$/.test(e)&&t&&/^\d+$/.test(t)&&e.length<=2&&!/^\d{8}$/.test(e)){i[i.length-1]=`${t}.${e}`;continue}const d=e.toLowerCase();i.push(o[d]??(/^[a-z]\d/i.test(e)?e.toUpperCase():e[0].toUpperCase()+e.slice(1)))}return i.join(" ")}export function vendorNames(e){return[...new Set(e.map(e=>prettyModelName(e).split(" ")[0]))]}export function modelFamily(e){const t=e.toLowerCase();return t.startsWith("claude-")?"claude":t.startsWith("gemini")?"gemini":t.startsWith("grok")?"grok":/^(gpt|o\d|codex)/.test(t)?"gpt":"other"}
1
+ import{getGatewayModelRules as e}from"./model-registry.js";export function autoCompactTokens(t,o){return o&&o>0?Math.min(o,t):Math.floor(t*e().autoCompactRatio)}export function gatewayModelSpecs(o,i,d=[]){const n=e().models,c=n.filter(e=>function(e,t){return"codebuddy"===e||("codex"===e?!t.id.startsWith("claude-")&&!1!==t.codex:"grok"===e?"grok"===modelFamily(t.id):!t.id.startsWith("claude-")&&!1!==t.claudeCode)}(o,e));if(!i)return c;const r=new Set(Object.values(i).flat().filter(e=>e.hidden).map(e=>e.id)),l=Object.fromEntries(Object.entries(i).map(([e,t])=>[e,t.filter(e=>!e.hidden)])),s=new Map;for(const e of Object.values(l).flat()){const t="codex"===o&&"gpt"===modelFamily(e.id)?void 0:e.clients?.[o];void 0===t||s.has(e.id)||s.set(e.id,t)}for(const[e,t]of s)t||r.add(e);const a=new Map(("claude-code"===o?n:c).map(e=>[e.id,e])),u=(l.gemini??[]).filter(e=>s.get(e.id)??!1!==n.find(t=>t.id===e.id)?.codex),m=("codebuddy"===o?[...l.claude??[],...l.codex??[],...l.gemini??[],...l.grok??[]]:"grok"===o?l.grok??[]:"codex"===o?[...l.codex??[],...u].filter(e=>!e.id.startsWith("claude-")):function(e,t){return[...(e.codex??[]).filter(e=>"gpt"===modelFamily(e.id)),...e.gemini??[],...e.grok??[],...(e.claude??[]).filter(e=>!e.id.startsWith("claude-"))].filter(e=>e.clients?.["claude-code"]??t.get(e.id)?.claudeCode??!0)}(l,a)).filter(e=>!(e=>!1===s.get(e.id))(e));if(0===m.length)return c.filter(e=>!r.has(e.id));const f=new Set,g=[];for(const e of m){if(f.has(e.id))continue;f.add(e.id);const{clients:t,minClientVersion:o,rolloutPercent:i,...d}=e,n={...a.get(e.id),...d};void 0!==t?.codex&&(n.codex=t.codex),void 0!==t?.["claude-code"]&&(n.claudeCode=t["claude-code"]),g.push(n)}return t[o].some(e=>d.includes(e))?g:function(e,t,o){const i=[...e];return t.forEach((e,d)=>{if(o.has(e.id)||i.some(t=>t.id===e.id))return;const n=modelFamily(e.id),c=new Set(t.slice(d+1).filter(e=>modelFamily(e.id)===n).map(e=>e.id));let r=i.findIndex(e=>c.has(e.id));if(r<0){r=i.length;for(let e=i.length-1;e>=0;e--)if(modelFamily(i[e].id)===n){r=e+1;break}}i.splice(r,0,e)}),i}(g,c,r)}const t={grok:["grok"],codex:["codex","gemini"],"claude-code":["codex","gemini","grok","claude"],codebuddy:["claude","codex","gemini","grok"]},o={gpt:"GPT",gemini:"Gemini",glm:"GLM",deepseek:"DeepSeek",minimax:"MiniMax",qwen:"Qwen"};export function modelBlurb(e,t={}){const o=[];for(const i of(e??"").split("|")){const e=i.trim();e&&(/\d\s*万?\s*输出|output\D*\d|\d\D*output/i.test(e)||(/[\d百千]\s*万?\s*上下文|context\D*\d|\d\D*context/i.test(e)?t.millionContext&&!o.includes("百万上下文")&&o.unshift("百万上下文"):o.push(e)))}return t.millionContext&&!o.includes("百万上下文")&&o.unshift("百万上下文"),o.length>0?o.join(" | "):void 0}export function prettyModelName(e){const t=e.replace(/^([a-z]+)(\d)/i,"$1 $2").split(/[-_\s]+/).filter(Boolean),i=[];for(const e of t){const t=i[i.length-1];if(/^\d+$/.test(e)&&t&&/^\d+$/.test(t)&&e.length<=2&&!/^\d{8}$/.test(e)){i[i.length-1]=`${t}.${e}`;continue}const d=e.toLowerCase();i.push(o[d]??(/^[a-z]\d/i.test(e)?e.toUpperCase():e[0].toUpperCase()+e.slice(1)))}return i.join(" ")}export function vendorNames(e){return[...new Set(e.map(e=>prettyModelName(e).split(" ")[0]))]}export function modelFamily(e){const t=e.toLowerCase();return t.startsWith("claude-")?"claude":t.startsWith("gemini")?"gemini":t.startsWith("grok")?"grok":/^(gpt|o\d|codex)/.test(t)?"gpt":"other"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibeapi/api-helper",
3
- "version": "0.0.182",
3
+ "version": "0.0.183",
4
4
  "description": "CLI tool for managing AI coding assistants (Claude Code, Codex, OpenClaw, Hermes, AtomCode, Grok Build) with one unified config",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",