jeopi-cli 16.5.1 → 16.5.5

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.
@@ -17,8 +17,8 @@ export interface CodexSearchParams {
17
17
  * Default-model behavior:
18
18
  * - If `PI_CODEX_WEB_SEARCH_MODEL` is set, use it exactly once and surface any
19
19
  * upstream error verbatim.
20
- * - Otherwise prefer ChatGPT-account-safe bundled defaults (GPT-5.4, GPT-5
21
- * Codex, GPT-5, …) and retry the next candidate only when Codex returns the
20
+ * - Otherwise prefer known bundled defaults, then include newly cataloged GPT
21
+ * models, and retry the next candidate only when Codex returns the
22
22
  * known 400 "model is not supported" family. This avoids selecting
23
23
  * `gpt-5-codex-mini` first on ChatGPT accounts, which OpenAI rejects.
24
24
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "jeopi-cli",
4
- "version": "16.5.1",
4
+ "version": "16.5.5",
5
5
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
6
6
  "homepage": "https://github.com/akillness/jeopi",
7
7
  "author": "Can Boluk",
@@ -57,17 +57,17 @@
57
57
  "@agentclientprotocol/sdk": "0.25.0",
58
58
  "@babel/parser": "^7.29.7",
59
59
  "@mozilla/readability": "^0.6.0",
60
- "jeopi-hashline": "16.5.1",
61
- "jeopi-stats": "16.5.1",
62
- "jeopi-agent-core": "16.5.1",
63
- "jeopi-ai": "16.5.1",
64
- "jeopi-catalog": "16.5.1",
65
- "jeopi-mnemopi": "16.5.1",
66
- "jeopi-natives": "16.5.1",
67
- "jeopi-tui": "16.5.1",
68
- "jeopi-utils": "16.5.1",
69
- "jeopi-wire": "16.5.1",
70
- "jeopi-snapcompact": "16.5.1",
60
+ "jeopi-hashline": "16.5.5",
61
+ "jeopi-stats": "16.5.5",
62
+ "jeopi-agent-core": "16.5.5",
63
+ "jeopi-ai": "16.5.5",
64
+ "jeopi-catalog": "16.5.5",
65
+ "jeopi-mnemopi": "16.5.5",
66
+ "jeopi-natives": "16.5.5",
67
+ "jeopi-tui": "16.5.5",
68
+ "jeopi-utils": "16.5.5",
69
+ "jeopi-wire": "16.5.5",
70
+ "jeopi-snapcompact": "16.5.5",
71
71
  "@opentelemetry/api": "^1.9.1",
72
72
  "@opentelemetry/context-async-hooks": "^2.7.1",
73
73
  "@opentelemetry/exporter-trace-otlp-proto": "^0.218.0",
@@ -1028,6 +1028,24 @@ export class ModelRegistry {
1028
1028
  }
1029
1029
 
1030
1030
  #resolveStartupModelCacheProviderId(providerId: string): string {
1031
+ if (providerId === "openai" || providerId === "openai-codex") {
1032
+ const commandKey = this.#resolveCommandBackedApiKey(providerId);
1033
+ const apiKey = commandKey.configured ? commandKey.value : this.authStorage.getModelCacheIdentity(providerId);
1034
+ const baseUrl =
1035
+ this.#runtimeProviderOverrides.get(providerId)?.baseUrl ??
1036
+ this.#providerOverrides.get(providerId)?.baseUrl ??
1037
+ this.getProviderBaseUrl(providerId);
1038
+ if (providerId === "openai-codex") {
1039
+ return (
1040
+ openaiCodexModelManagerOptions({
1041
+ accessToken: apiKey,
1042
+ baseUrl,
1043
+ }).cacheProviderId ?? providerId
1044
+ );
1045
+ }
1046
+ const descriptor = PROVIDER_DESCRIPTORS.find(candidate => candidate.providerId === providerId);
1047
+ return descriptor?.createModelManagerOptions({ apiKey, baseUrl }).cacheProviderId ?? providerId;
1048
+ }
1031
1049
  const descriptor = PROVIDER_DESCRIPTORS.find(candidate => candidate.providerId === providerId);
1032
1050
  if (!descriptor) {
1033
1051
  return providerId;
@@ -1594,6 +1612,8 @@ export class ModelRegistry {
1594
1612
  return openaiCodexModelManagerOptions({
1595
1613
  accessToken,
1596
1614
  accountId,
1615
+ baseUrl: this.getProviderBaseUrl("openai-codex"),
1616
+ fetch: this.#fetch,
1597
1617
  });
1598
1618
  },
1599
1619
  },
@@ -1645,6 +1665,11 @@ export class ModelRegistry {
1645
1665
  }
1646
1666
  options.push(descriptor.createOptions(key));
1647
1667
  }
1668
+ for (const option of options) {
1669
+ if (option.providerId === "openai" || option.providerId === "openai-codex") {
1670
+ option.cacheProviderId = this.#resolveStartupModelCacheProviderId(option.providerId);
1671
+ }
1672
+ }
1648
1673
  // Append runtime model managers registered by extensions via fetchDynamicModels.
1649
1674
  for (const { options: managerOpts } of this.#runtimeModelManagers.values()) {
1650
1675
  options.push(managerOpts);
@@ -44,17 +44,12 @@ function getDefaultModelCandidates(): string[] {
44
44
  const bundledModels = getBundledModels("openai-codex");
45
45
  const bundledIds = new Set(bundledModels.map(model => model.id));
46
46
  const candidates = DEFAULT_MODEL_PREFERENCES.filter(modelId => bundledIds.has(modelId));
47
-
48
- if (candidates.length > 0) {
49
- return candidates;
50
- }
51
-
52
- const nonMini = bundledModels.find(model => !model.id.includes("mini") && !model.id.includes("spark"));
53
- if (nonMini) {
54
- return [nonMini.id];
47
+ for (const model of bundledModels) {
48
+ if (/^gpt-\d/.test(model.id) && !candidates.includes(model.id)) {
49
+ candidates.push(model.id);
50
+ }
55
51
  }
56
-
57
- return bundledModels[0]?.id ? [bundledModels[0].id] : [FALLBACK_MODEL];
52
+ return candidates.length > 0 ? candidates : [FALLBACK_MODEL];
58
53
  }
59
54
 
60
55
  function shouldRetryWithNextDefaultModel(error: unknown): boolean {
@@ -489,8 +484,8 @@ async function callCodexSearch(
489
484
  * Default-model behavior:
490
485
  * - If `PI_CODEX_WEB_SEARCH_MODEL` is set, use it exactly once and surface any
491
486
  * upstream error verbatim.
492
- * - Otherwise prefer ChatGPT-account-safe bundled defaults (GPT-5.4, GPT-5
493
- * Codex, GPT-5, …) and retry the next candidate only when Codex returns the
487
+ * - Otherwise prefer known bundled defaults, then include newly cataloged GPT
488
+ * models, and retry the next candidate only when Codex returns the
494
489
  * known 400 "model is not supported" family. This avoids selecting
495
490
  * `gpt-5-codex-mini` first on ChatGPT accounts, which OpenAI rejects.
496
491
  */