pi-anthropic-oauth 0.1.12 → 0.1.14

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 (3) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/src/index.ts +10 -13
package/README.md CHANGED
@@ -11,7 +11,7 @@ Use Claude Pro/Max in Pi with browser OAuth.
11
11
  - Claude Code-compatible OAuth headers and prompt shaping
12
12
  - No API key or extra usage needed.
13
13
  - Uses Pi's Anthropic model registry
14
- - Adds Claude Opus 4.7 by default
14
+ - Adds Claude Opus 4.8 by default
15
15
  - Auto-creates `~/.Claude Code` → `~/.pi` symlink when missing
16
16
 
17
17
  ## Quick start
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-anthropic-oauth",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
4
4
  "description": "Claude Pro/Max OAuth extension for Pi",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/index.ts CHANGED
@@ -11,11 +11,12 @@ import type { OAuthCredentials } from "@earendil-works/pi-ai";
11
11
  import { loginAnthropic, refreshAnthropicToken } from "./auth.js";
12
12
  import { streamAnthropicOAuth } from "./stream.js";
13
13
 
14
- const DEFAULT_OPUS_4_7: NonNullable<ProviderConfig["models"]>[number] = {
15
- id: "claude-opus-4-7",
16
- name: "Claude Opus 4.7",
14
+ const DEFAULT_OPUS_4_8: NonNullable<ProviderConfig["models"]>[number] = {
15
+ id: "claude-opus-4-8",
16
+ name: "Claude Opus 4.8",
17
17
  api: "anthropic-messages",
18
18
  reasoning: true,
19
+ thinkingLevelMap: { xhigh: "xhigh" },
19
20
  input: ["text", "image"],
20
21
  cost: { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 },
21
22
  contextWindow: 1000000,
@@ -38,20 +39,16 @@ function getAnthropicModels(): NonNullable<ProviderConfig["models"]> {
38
39
  const models: NonNullable<ProviderConfig["models"]> = modelRegistry
39
40
  .getAll()
40
41
  .filter((model) => model.provider === "anthropic")
42
+ // Spread the full registry model so every field (thinkingLevelMap,
43
+ // baseUrl, headers, compat, and anything added in future) propagates
44
+ // automatically instead of being silently dropped by a hand-picked list.
41
45
  .map((model) => ({
42
- id: model.id,
43
- name: model.name,
46
+ ...model,
44
47
  api: model.api ?? "anthropic-messages",
45
- reasoning: model.reasoning,
46
- input: model.input,
47
- cost: model.cost,
48
- contextWindow: model.contextWindow,
49
- maxTokens: model.maxTokens,
50
- compat: model.compat,
51
48
  }));
52
49
 
53
- if (!models.some((model) => model.id === DEFAULT_OPUS_4_7.id)) {
54
- models.push(DEFAULT_OPUS_4_7);
50
+ if (!models.some((model) => model.id === DEFAULT_OPUS_4_8.id)) {
51
+ models.push(DEFAULT_OPUS_4_8);
55
52
  }
56
53
 
57
54
  return models;