@oh-my-pi/pi-ai 11.14.0 → 11.14.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oh-my-pi/pi-ai",
3
- "version": "11.14.0",
3
+ "version": "11.14.2",
4
4
  "description": "Unified LLM API with automatic model discovery and provider configuration",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -63,7 +63,7 @@
63
63
  "@connectrpc/connect-node": "^2.1.1",
64
64
  "@google/genai": "^1.39.0",
65
65
  "@mistralai/mistralai": "^1.13.0",
66
- "@oh-my-pi/pi-utils": "11.14.0",
66
+ "@oh-my-pi/pi-utils": "11.14.2",
67
67
  "@sinclair/typebox": "^0.34.48",
68
68
  "@smithy/node-http-handler": "^4.4.9",
69
69
  "ajv": "^8.17.1",
@@ -59,19 +59,19 @@ function getCacheControl(
59
59
  }
60
60
 
61
61
  // Stealth mode: Mimic Claude Code headers and tool prefixing.
62
- export const claudeCodeVersion = "1.0.83";
62
+ export const claudeCodeVersion = "2.1.39";
63
63
  export const claudeToolPrefix = "proxy_";
64
64
  export const claudeCodeSystemInstruction = "You are Claude Code, Anthropic's official CLI for Claude.";
65
65
  export const claudeCodeHeaders = {
66
66
  "X-Stainless-Helper-Method": "stream",
67
67
  "X-Stainless-Retry-Count": "0",
68
- "X-Stainless-Runtime-Version": "v24.3.0",
69
- "X-Stainless-Package-Version": "0.55.1",
68
+ "X-Stainless-Runtime-Version": "v24.13.1",
69
+ "X-Stainless-Package-Version": "0.73.0",
70
70
  "X-Stainless-Runtime": "node",
71
71
  "X-Stainless-Lang": "js",
72
72
  "X-Stainless-Arch": "arm64",
73
73
  "X-Stainless-Os": "MacOS",
74
- "X-Stainless-Timeout": "60",
74
+ "X-Stainless-Timeout": "600",
75
75
  } as const;
76
76
 
77
77
  export const applyClaudeToolPrefix = (name: string) => {
@@ -92,7 +92,7 @@ const claudeCodeBetaDefaults = [
92
92
  "claude-code-20250219",
93
93
  "oauth-2025-04-20",
94
94
  "interleaved-thinking-2025-05-14",
95
- "fine-grained-tool-streaming-2025-05-14",
95
+ "prompt-caching-scope-2026-01-05",
96
96
  ];
97
97
 
98
98
  // Prefix tool names for OAuth traffic.
@@ -465,7 +465,7 @@ export function buildAnthropicHeaders(options: AnthropicHeaderOptions): Record<s
465
465
  ...modelHeaders,
466
466
  ...claudeCodeHeaders,
467
467
  Accept: acceptHeader,
468
- "Accept-Encoding": "gzip, deflate, br, zstd",
468
+ "Accept-Encoding": "br, gzip, deflate",
469
469
  Connection: "keep-alive",
470
470
  "Content-Type": "application/json",
471
471
  "Anthropic-Version": "2023-06-01",
@@ -7,11 +7,11 @@ import type { OAuthController, OAuthCredentials } from "./types";
7
7
 
8
8
  const decode = (s: string) => atob(s);
9
9
  const CLIENT_ID = decode("OWQxYzI1MGEtZTYxYi00NGQ5LTg4ZWQtNTk0NGQxOTYyZjVl");
10
- const AUTHORIZE_URL = "https://claude.ai/oauth/authorize";
11
- const TOKEN_URL = "https://console.anthropic.com/v1/oauth/token";
10
+ const AUTHORIZE_URL = "https://platform.claude.com/oauth/authorize";
11
+ const TOKEN_URL = "https://platform.claude.com/v1/oauth/token";
12
12
  const CALLBACK_PORT = 54545;
13
13
  const CALLBACK_PATH = "/callback";
14
- const SCOPES = "org:create_api_key user:profile user:inference";
14
+ const SCOPES = "org:create_api_key user:profile user:inference user:sessions:claude_code user:mcp_servers";
15
15
 
16
16
  class AnthropicOAuthFlow extends OAuthCallbackFlow {
17
17
  #verifier: string = "";