pi-usage-limits 0.1.1 → 0.1.3

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
@@ -25,7 +25,9 @@ A [pi](https://github.com/earendil-works/pi) extension that shows your **Claude*
25
25
  | Active model | Source | Shows |
26
26
  |---|---|---|
27
27
  | Model id contains `claude` | Claude Agent SDK (Claude Code login) | 5-hour and 7-day utilization |
28
- | `openai-codex` provider, or model id contains `codex` | ChatGPT usage endpoint (pi's `openai-codex` login) | 5-hour and weekly usage |
28
+ | `openai` or `openai-codex` provider, or model id contains `codex` | ChatGPT usage endpoint (pi's `openai-codex` login) | 5-hour and weekly usage |
29
+
30
+ OpenAI models such as `(openai) gpt-6.1-sol` show the same ChatGPT subscription limits using your `openai-codex` login, not OpenAI API limits.
29
31
 
30
32
  Other models show `<model> not supported yet`.
31
33
 
package/claude_limits.ts CHANGED
@@ -23,6 +23,8 @@ export const getLimits = async function (): Promise<ClaudeLimits> {
23
23
  persistSession: false,
24
24
  settingSources: [],
25
25
  strictMcpConfig: true,
26
+ // pi-claude-bridge sets this in pi's process; the CLI then skips the usage fetch and returns null
27
+ env: { ...process.env, CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: undefined },
26
28
  // CLI only explains a null usage result in its debug log
27
29
  extraArgs: { "debug-to-stderr": null },
28
30
  stderr: (s) => log.push(s),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-usage-limits",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "pi-package",
package/usage.ts CHANGED
@@ -14,7 +14,11 @@ export async function getUsage(
14
14
  model: { id: string; provider?: string },
15
15
  auth: TokenSource,
16
16
  ): Promise<string> {
17
- if (model.provider === "openai-codex" || model.id.includes("codex")) {
17
+ if (
18
+ model.provider === "openai" ||
19
+ model.provider === "openai-codex" ||
20
+ model.id.includes("codex")
21
+ ) {
18
22
  return getCodexUsage(auth);
19
23
  }
20
24