@narumitw/pi-usage 0.64.2 → 0.65.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.
package/README.md CHANGED
@@ -115,10 +115,17 @@ Run `/fast` without arguments to toggle Fast for the active supported Codex mode
115
115
  Fast is about 1.5× faster and uses more of your plan allowance.
116
116
  The `codexFastMode` preference defaults to Off.
117
117
 
118
- Fast currently applies only to official `openai-codex-responses` requests for `gpt-5.5`, `gpt-5.6-sol`, `gpt-5.6-terra`, `gpt-5.6-luna`, `gpt-6-sol`, and `gpt-6.1-sol` at `https://chatgpt.com`.
119
- It sends `service_tier: "priority"` while enabled and explicit `service_tier: "default"` otherwise.
118
+ Fast applies to official `openai-codex-responses` requests at `https://chatgpt.com` when the current account's Codex model directory advertises a `priority` service tier or the legacy `fast` speed tier.
119
+ Discovery validates the active OAuth account and caches its model capabilities for five minutes, with background refresh on session and model changes.
120
+ `/fast` and `/usage` can refresh capability information before enabling Fast or displaying its controls, while provider request hooks use the account-validated cache and leave directory refresh in the background.
121
+
122
+ The `fast` label indicates requested priority routing, not a measured speedup; actual availability and speed depend on the service.
123
+ It sends `service_tier: "priority"` while enabled and supported, and explicit `service_tier: "default"` otherwise.
120
124
  The statusline adds `fast` only while the preference is effective, for example `codex fast 59% ↻ 2h30m` with the default reset countdown.
121
- Unsupported models and custom or proxy origins are left unchanged.
125
+ A missing model, incomplete capability information, or first directory failure displays **Unknown** and uses standard routing, with `codex (Fast unknown)` shown when the preference remains enabled.
126
+ Temporary network failures reuse successful discovery for the same account, while authentication rejection or malformed directory data invalidates that account's capability information.
127
+ The preference can still be turned off while capability information is unknown.
128
+ Other providers, APIs, and custom or proxy origins retain their own request payloads.
122
129
 
123
130
  A toggle affects provider requests whose payload hook starts after the save; a request already sent is unchanged.
124
131
  Repair or remove an invalid file, then run `/reload` before trying the toggle again.
@@ -1540,7 +1540,7 @@ var OPENAI_CHATGPT_ADAPTER = {
1540
1540
  invalidateCacheOnFailure: true,
1541
1541
  async query(auth, signal, timeoutMs, guard) {
1542
1542
  if (auth.openaiCompanion) {
1543
- const { queryOpenAICompanionUsage } = await import("./openai-companion-usage-TGHK2OQR.ts");
1543
+ const { queryOpenAICompanionUsage } = await import("./openai-companion-usage-ZFAHCGEY.ts");
1544
1544
  signal.throwIfAborted();
1545
1545
  return queryOpenAICompanionUsage(auth, signal, timeoutMs, guard);
1546
1546
  }
@@ -2691,7 +2691,7 @@ async function resolveUsageAuth(ctx, adapter, salt = AUTH_FINGERPRINT_SALT, cred
2691
2691
  const native = finalize(
2692
2692
  resolveOpenAIChatGPTAuth(auth, providerResult.auth, providerResult.source, model, offered.candidates)
2693
2693
  );
2694
- const { resolveOpenAICompanionAuth } = await import("./openai-companion-auth-FGFC6DBT.ts");
2694
+ const { resolveOpenAICompanionAuth } = await import("./openai-companion-auth-QIKCD3WA.ts");
2695
2695
  return resolveOpenAICompanionAuth(ctx, native, salt, credentialReader, candidateReader);
2696
2696
  }
2697
2697
  if (adapter.id === "github-copilot") {
@@ -2842,7 +2842,7 @@ async function fetchProviderJson(url, auth, signal, timeoutMs, description, requ
2842
2842
  if (controller.signal.aborted) throw Object.assign(new Error("Usage query aborted."), { name: "AbortError" });
2843
2843
  const text = await readBoundedResponse(
2844
2844
  response,
2845
- response.ok ? MAX_SUCCESS_BODY_BYTES : MAX_ERROR_BODY_BYTES,
2845
+ response.ok ? request.maxSuccessBodyBytes ?? MAX_SUCCESS_BODY_BYTES : MAX_ERROR_BODY_BYTES,
2846
2846
  !response.ok,
2847
2847
  description,
2848
2848
  controller.signal
@@ -3274,4 +3274,4 @@ export {
3274
3274
  providerIsConfigured,
3275
3275
  fetchProviderJson
3276
3276
  };
3277
- //# sourceMappingURL=chunk-ACPQJ2CM.ts.map
3277
+ //# sourceMappingURL=chunk-N2ZD5X4K.ts.map