pi-anthropic-oauth 0.1.4 → 0.1.6
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 +2 -1
- package/package.json +1 -1
- package/src/index.ts +2 -2
- package/src/stream.ts +2 -2
package/README.md
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
# Pi Anthropic OAuth
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/pi-anthropic-oauth) [](https://nodejs.org)
|
|
3
|
+
[](https://www.npmjs.com/package/pi-anthropic-oauth) [](https://www.npmjs.com/package/pi-anthropic-oauth) [](https://nodejs.org)
|
|
4
4
|
|
|
5
5
|
Claude Pro/Max OAuth extension for Pi.
|
|
6
6
|
|
|
7
7
|
> [!WARNING]
|
|
8
8
|
> Use this at your own risk. This may go against Anthropic's terms.
|
|
9
|
+
> I do not recommend using this with gsd2 or any extensions that will cause heavy token usage.
|
|
9
10
|
|
|
10
11
|
## Install
|
|
11
12
|
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -13,7 +13,7 @@ const MODELS = [
|
|
|
13
13
|
reasoning: true,
|
|
14
14
|
input: ["text", "image"] as ("text" | "image")[],
|
|
15
15
|
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
|
16
|
-
contextWindow:
|
|
16
|
+
contextWindow: 1000000,
|
|
17
17
|
maxTokens: 128000,
|
|
18
18
|
},
|
|
19
19
|
{
|
|
@@ -22,7 +22,7 @@ const MODELS = [
|
|
|
22
22
|
reasoning: true,
|
|
23
23
|
input: ["text", "image"] as ("text" | "image")[],
|
|
24
24
|
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
|
25
|
-
contextWindow:
|
|
25
|
+
contextWindow: 1000000,
|
|
26
26
|
maxTokens: 64000,
|
|
27
27
|
},
|
|
28
28
|
{
|
package/src/stream.ts
CHANGED
|
@@ -105,8 +105,8 @@ export function streamAnthropicOAuth(
|
|
|
105
105
|
|
|
106
106
|
const client = new Anthropic({
|
|
107
107
|
baseURL: model.baseUrl,
|
|
108
|
-
apiKey: isOAuth ?
|
|
109
|
-
authToken: isOAuth ? apiKey :
|
|
108
|
+
apiKey: isOAuth ? null : apiKey,
|
|
109
|
+
authToken: isOAuth ? apiKey : null,
|
|
110
110
|
defaultHeaders,
|
|
111
111
|
dangerouslyAllowBrowser: true,
|
|
112
112
|
});
|