@bitkyc08/opencodex 2.72.0 → 2.73.0

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.
Files changed (79) hide show
  1. package/gui/dist/assets/{App-Cf-WYstE.js → App-mHGa7dE1.js} +15 -15
  2. package/gui/dist/assets/{Tray-DkM0mULy.js → Tray-BxY_RYZg.js} +1 -1
  3. package/gui/dist/assets/{index-PWrwOfio.js → index-ur_BPgK1.js} +12 -12
  4. package/gui/dist/assets/{quota-summary-D-FKtrgr.js → quota-summary-D1Vq7N9H.js} +1 -1
  5. package/gui/dist/index.html +1 -1
  6. package/package.json +1 -1
  7. package/src/adapters/cursor/native-exec.ts +28 -10
  8. package/src/adapters/devin/live-models.ts +5 -0
  9. package/src/adapters/kiro/reasoning.ts +2 -0
  10. package/src/adapters/openai-chat/messages.ts +4 -1
  11. package/src/adapters/openai-responses/passthrough.ts +12 -1
  12. package/src/adapters/openai-responses/reasoning.ts +15 -0
  13. package/src/bridge/internal.ts +12 -0
  14. package/src/cli/account-anthropic-threshold.ts +41 -0
  15. package/src/cli/account-api.ts +2 -0
  16. package/src/cli/account-extended.ts +32 -21
  17. package/src/cli/account.ts +1 -0
  18. package/src/cli/capabilities.ts +8 -4
  19. package/src/cli/index.ts +1 -1
  20. package/src/codex/catalog/build-entries.ts +6 -5
  21. package/src/codex/catalog/derive-entry.ts +3 -4
  22. package/src/codex/catalog/gather-capture.ts +2 -0
  23. package/src/codex/catalog/metadata.ts +6 -0
  24. package/src/codex/catalog/native-models.ts +17 -3
  25. package/src/codex/catalog/parsing.ts +4 -1
  26. package/src/codex/catalog/pinned-models.ts +3 -1
  27. package/src/codex/catalog/provider-models.ts +22 -2
  28. package/src/codex/data/roster-pinned-models.json +178 -1
  29. package/src/codex/model-entitlements.ts +1 -1
  30. package/src/codex/native-profile-store.ts +2 -1
  31. package/src/combos/resolve.ts +16 -1
  32. package/src/config/subagent-models.ts +30 -5
  33. package/src/generated/compatibility-version.json +95 -67
  34. package/src/generated/model-metadata.ts +4 -4
  35. package/src/lib/account-selection-events.ts +28 -0
  36. package/src/lib/errors.ts +7 -5
  37. package/src/lib/keyring-native.ts +132 -0
  38. package/src/lib/provider-outbound.ts +13 -0
  39. package/src/lib/retry-delay.ts +10 -0
  40. package/src/oauth/anthropic-account-threshold.ts +13 -0
  41. package/src/oauth/anthropic-routing.ts +223 -52
  42. package/src/oauth/index.ts +4 -2
  43. package/src/oauth/store.ts +45 -3
  44. package/src/oauth/types.ts +2 -0
  45. package/src/providers/api-key-resolve.ts +2 -4
  46. package/src/providers/codebuddy-models.ts +6 -0
  47. package/src/providers/kiro-models.ts +4 -0
  48. package/src/providers/label.ts +20 -1
  49. package/src/providers/quota/account-cache.ts +2 -1
  50. package/src/providers/quota/anthropic-cooldown-recovery.ts +118 -0
  51. package/src/providers/quota/vendor-probes-oauth.ts +84 -57
  52. package/src/providers/quota.ts +45 -46
  53. package/src/providers/registry/entries-core.ts +3 -1
  54. package/src/providers/registry/entries-extended.ts +14 -1
  55. package/src/providers/registry/model-seeds.ts +7 -1
  56. package/src/server/claude-messages.ts +84 -27
  57. package/src/server/management/anthropic-account-threshold.ts +27 -0
  58. package/src/server/management/oauth-account-routes.ts +17 -4
  59. package/src/server/management/route-registry.ts +1 -0
  60. package/src/server/messages-native-oauth.ts +20 -21
  61. package/src/server/messages-native.ts +39 -14
  62. package/src/server/relay-eager.ts +5 -2
  63. package/src/server/relay.ts +268 -82
  64. package/src/server/responses/adapter-continuation.ts +6 -0
  65. package/src/server/responses/adapter-delivery.ts +25 -7
  66. package/src/server/responses/adapter-dispatch.ts +31 -0
  67. package/src/server/responses/buffered-sse-json.ts +345 -0
  68. package/src/server/responses/core-codex-account.ts +4 -1
  69. package/src/server/responses/core-combo.ts +28 -0
  70. package/src/server/responses/core-lifetime.ts +4 -0
  71. package/src/server/responses/passthrough-delivery.ts +305 -10
  72. package/src/server/responses/passthrough-dispatch.ts +60 -25
  73. package/src/server/responses/passthrough-error.ts +3 -1
  74. package/src/server/responses/request-transport.ts +22 -5
  75. package/src/server/responses/terminal-error-redaction.ts +53 -0
  76. package/src/service/windows-taskxml.ts +20 -6
  77. package/src/service-manager-probe.ts +115 -6
  78. package/src/types/wire.ts +7 -0
  79. package/src/usage/expected-prices.ts +11 -0
@@ -150,7 +150,7 @@ function composeGatedClientVersionFloor(
150
150
 
151
151
  // Reads every pinned row (codex-rs snapshot plus roster-captured rows), so a gated slug whose row
152
152
  // arrives through roster-pinned-models.json still contributes its floor. None does today:
153
- // gpt-6-sol/luna are ungated, and gpt-6-astra-minor has no row and no measured minimum.
153
+ // gpt-6-sol/luna and gpt-6.1-sol are ungated, and gpt-6-astra-minor has no row and no measured minimum.
154
154
  export const GATED_MODEL_CLIENT_VERSION_FLOOR: string = composeGatedClientVersionFloor(
155
155
  pinnedNativeModelRows(),
156
156
  );
@@ -20,6 +20,7 @@ import {
20
20
  } from "node:fs";
21
21
  import { basename, dirname, join, resolve } from "node:path";
22
22
  import { getConfigDir } from "../config";
23
+ import { loadKeyringBinding } from "../lib/keyring-native";
23
24
  import { extractAccountId } from "../oauth/chatgpt";
24
25
  import { getCodexHome, readRootTomlString } from "./paths";
25
26
  import {
@@ -120,7 +121,7 @@ export class OsNativeProfileKeyProvider implements NativeProfileKeyProvider {
120
121
 
121
122
  private async entry(homeId: string): Promise<NativeKeyringEntry> {
122
123
  try {
123
- const { AsyncEntry } = await import("@napi-rs/keyring");
124
+ const { AsyncEntry } = loadKeyringBinding();
124
125
  return new AsyncEntry(KEYRING_SERVICE, homeId) as unknown as NativeKeyringEntry;
125
126
  } catch {
126
127
  throw new NativeProfileError(
@@ -380,13 +380,28 @@ export function advanceComboAfterFailure(
380
380
  status?: number;
381
381
  code?: string | null;
382
382
  message?: string;
383
+ /** Account-qualified provider label of the account this failure came from, when a pool resolved one. */
384
+ failedAccount?: string;
383
385
  } = {},
384
386
  ): ComboPick | null {
385
387
  noteComboFailure(pick.comboId, pick.target, pick.writerGeneration);
386
388
  const combo = getCombo(config, pick.comboId);
389
+ // A 429 from a pooled provider names the ACCOUNT that is spent, not the target. The pool
390
+ // records that account's own cooldown and rotates past it, so cooling the target here blacks
391
+ // out the accounts that still answer: on 2026-09-28 one Anthropic account replied
392
+ // `Retry-After: 318747` (88.5h) and anthropic/claude-opus-5-5 left selection for four hours
393
+ // while four of five accounts still returned 200.
394
+ //
395
+ // Only a pool-resolved account qualifies, and an unidentified account still cools the target --
396
+ // including the pool's OWN "all accounts are cooled" 429, which refuses locally before it picks
397
+ // one. That is what keeps this from trading a blackhole for a hammer: when nothing else is
398
+ // holding the target back, the target cooldown still does.
399
+ const accountScoped = options.cooldownScope === "target"
400
+ && options.status === 429
401
+ && options.failedAccount !== undefined;
387
402
  // "none" records no cooldown at all: the failure described the request, not the target, so
388
403
  // the target must stay immediately selectable for the next (differently shaped) request.
389
- if (options.cooldownScope !== "none") {
404
+ if (options.cooldownScope !== "none" && !accountScoped) {
390
405
  const cooldownTargets = options.cooldownScope === "provider" && combo
391
406
  ? combo.targets.filter(target => target.provider === pick.target.provider)
392
407
  : [pick.target];
@@ -1,10 +1,18 @@
1
1
  import type { OcxConfig } from "../types";
2
- import { NATIVE_GPT6_ASTRA_MODEL, NATIVE_GPT6_LUNA_MODEL, NATIVE_GPT6_SOL_MODEL } from "../codex/catalog/native-models";
2
+ import {
3
+ NATIVE_GPT6_ASTRA_MODEL,
4
+ NATIVE_GPT6_LUNA_MODEL,
5
+ NATIVE_GPT6_SOL_MODEL,
6
+ NATIVE_GPT61_SOL_MODEL,
7
+ } from "../codex/catalog/native-models";
3
8
 
4
- export const SUBAGENT_MODELS_VERSION = 2;
9
+ export const SUBAGENT_MODELS_VERSION = 3;
5
10
 
6
- /** Native featured defaults: the GPT-6 trio. Codex advertises at most five picker-visible rows. */
7
- export const DEFAULT_SUBAGENT_MODELS = [NATIVE_GPT6_ASTRA_MODEL, NATIVE_GPT6_SOL_MODEL, NATIVE_GPT6_LUNA_MODEL];
11
+ /**
12
+ * Native featured defaults: Astra, the current Sol (GPT-6.1) and Luna. Codex advertises at most
13
+ * five picker-visible rows. Only Sol received a 6.1 release, so Astra and Luna stay on GPT-6.
14
+ */
15
+ export const DEFAULT_SUBAGENT_MODELS = [NATIVE_GPT6_ASTRA_MODEL, NATIVE_GPT61_SOL_MODEL, NATIVE_GPT6_LUNA_MODEL];
8
16
 
9
17
  /** Bare native families the version-2 upgrade removes from a roster. */
10
18
  const RETIRED_ROSTER_FAMILY = /^gpt-5\.[56](?:-|$)/;
@@ -32,6 +40,20 @@ function upgradeRetiredRosterRows(models: readonly string[]): string[] {
32
40
  return upgraded.length === 0 && models.length > 0 ? [...DEFAULT_SUBAGENT_MODELS] : upgraded;
33
41
  }
34
42
 
43
+ /**
44
+ * Version 3: GPT-6 Sol gives its roster slot to GPT-6.1 Sol, in place, once. Only the bare id
45
+ * moves; a routed or account-qualified id keeps its exact spelling. GPT-6 Sol stays a supported
46
+ * model, so a user who adds it back afterwards keeps it.
47
+ */
48
+ function upgradeSolTo61(models: readonly string[]): string[] {
49
+ const upgraded: string[] = [];
50
+ for (const model of models) {
51
+ const next = model === NATIVE_GPT6_SOL_MODEL ? NATIVE_GPT61_SOL_MODEL : model;
52
+ if (!upgraded.includes(next)) upgraded.push(next);
53
+ }
54
+ return upgraded;
55
+ }
56
+
35
57
  /** One-time upgrades; later user edits (including removing Astra) remain authoritative. */
36
58
  export function migrateSubagentModels(config: OcxConfig): boolean {
37
59
  const version = config.subagentModelsVersion ?? 0;
@@ -46,7 +68,10 @@ export function migrateSubagentModels(config: OcxConfig): boolean {
46
68
  if (retained.includes("gpt-5.5")) config.subagentModels.push("gpt-5.5");
47
69
  }
48
70
  }
49
- if (config.subagentModels !== undefined) config.subagentModels = upgradeRetiredRosterRows(config.subagentModels);
71
+ if (version < 2 && config.subagentModels !== undefined) {
72
+ config.subagentModels = upgradeRetiredRosterRows(config.subagentModels);
73
+ }
74
+ if (config.subagentModels !== undefined) config.subagentModels = upgradeSolTo61(config.subagentModels);
50
75
  config.subagentModelsVersion = SUBAGENT_MODELS_VERSION;
51
76
  return true;
52
77
  }