@nanogpt/private-mode 0.1.1 → 0.1.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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # NanoGPT Private Mode
2
2
 
3
- OpenAI-compatible localhost proxy for NanoGPT Private Mode with Tinfoil-backed models.
3
+ OpenAI-compatible localhost proxy for NanoGPT Private Mode with supported TEE models.
4
4
 
5
5
  ```bash
6
6
  NANOGPT_API_KEY=sk-your-key npx @nanogpt/private-mode
@@ -28,17 +28,17 @@ const response = await client.chat.completions.create({
28
28
  });
29
29
  ```
30
30
 
31
- The local proxy verifies Tinfoil attestation, encrypts request bodies with EHBP, sends ciphertext through NanoGPT, decrypts encrypted responses locally, and returns normal OpenAI JSON to the calling app.
31
+ The local proxy verifies TEE attestation, encrypts request bodies with EHBP, sends ciphertext through NanoGPT, decrypts encrypted responses locally, and returns normal OpenAI JSON to the calling app.
32
32
 
33
- NanoGPT can see account identity, selected private model, selected Tinfoil enclave metadata, timing, sizes, status, and usage metadata. NanoGPT cannot read the prompt or completion body for supported private models.
33
+ NanoGPT can see account identity, selected private model, selected TEE target metadata, timing, sizes, status, and usage metadata. NanoGPT cannot read the prompt or completion body for supported private models.
34
34
 
35
- NanoGPT's web app can also use these models without running this local proxy. Select an eligible Tinfoil-backed `TEE/*` model and use the Private Mode control in the model picker. This package is for API clients, CLIs, agents, and other OpenAI-compatible tools.
35
+ NanoGPT's web app can also use these models without running this local proxy. Select an eligible Private Mode model and use the Private Mode control in the model picker. This package is for API clients, CLIs, agents, and other OpenAI-compatible tools.
36
36
 
37
37
  The web-app toggle is narrower than the proxy path in v1. It supports text chat and model settings, and disables attachments, web search, URL-scraped content, project tools, multi-model chat, Context Memory injection, quick replies, and automatic title generation for private turns.
38
38
 
39
39
  In the hosted web app, decrypted Private Mode turns remain in local browser history. Cloud conversation sync is blocked for Private Mode chats unless password-based end-to-end sync is enabled; the recoverable default sync mode is not used for those chats.
40
40
 
41
- Private Mode also requires enough NanoGPT balance and API-key spend-limit headroom before dispatch. NanoGPT cannot read encrypted prompts to count tokens, so the reserve uses the encrypted request size when available and otherwise falls back to a conservative model estimate capped at 32,768 output tokens by default (`NANOGPT_PRIVATE_TINFOIL_RESERVE_MAX_OUTPUT_TOKENS`). The final charge is still based on Tinfoil usage metrics.
41
+ Private Mode also requires enough NanoGPT balance and API-key spend-limit headroom before dispatch. For streaming calls, NanoGPT may precharge a conservative reserve before dispatch and refund unused balance after verified usage metadata is available.
42
42
 
43
43
  Useful local checks:
44
44
 
package/lib/server.js CHANGED
@@ -9,7 +9,7 @@ import { applyPrivateModelRequestMutations } from './requestTransforms.js';
9
9
  import { buildPrivateModeStatusContract } from './statusContract.js';
10
10
 
11
11
  const MODELS = JSON.parse(
12
- readFileSync(new URL('../models/tinfoil.json', import.meta.url), 'utf8'),
12
+ readFileSync(new URL('../models/private-tee.json', import.meta.url), 'utf8'),
13
13
  );
14
14
 
15
15
  function readMaxBodyBytes() {
@@ -66,7 +66,7 @@ function openAIModelList() {
66
66
  export function privateModeStatus(apiBase, secureState, localBase, originPolicy) {
67
67
  return {
68
68
  ok: true,
69
- mode: 'tinfoil',
69
+ mode: 'private_tee',
70
70
  apiBase,
71
71
  local_base_url: localBase,
72
72
  models_path: '/v1/models',
@@ -484,7 +484,7 @@ Allowed browser origins: ${originPolicy.allowedOrigins.join(', ')}
484
484
 
485
485
  Request and response bodies are encrypted after they leave this local proxy.
486
486
  NanoGPT can see your account, private model header, timing, sizes, status, and usage metadata.
487
- The verified Tinfoil enclave and this local proxy can see plaintext.
487
+ The verified TEE target and this local proxy can see plaintext.
488
488
  `);
489
489
  }
490
490
 
@@ -22,7 +22,7 @@ export const PRIVATE_MODE_FRONTEND_DISABLED_FEATURES = Object.freeze([
22
22
  export const PRIVATE_MODE_NANOGPT_VISIBLE = Object.freeze([
23
23
  'account',
24
24
  'selected_private_model',
25
- 'selected_tinfoil_enclave',
25
+ 'selected_tee_target',
26
26
  'request_timing',
27
27
  'request_size',
28
28
  'response_size',
@@ -40,7 +40,7 @@ export const PRIVATE_MODE_ENCRYPTED_FROM_NANOGPT = Object.freeze([
40
40
 
41
41
  export const PRIVATE_MODE_PLAINTEXT_VISIBLE_TO = Object.freeze([
42
42
  'local_proxy',
43
- 'verified_tinfoil_enclave',
43
+ 'verified_tee_target',
44
44
  ]);
45
45
 
46
46
  export function buildPrivateModeStatusContract() {
@@ -4,9 +4,9 @@
4
4
  "name": "Kimi K2.6 Private",
5
5
  "upstreamModel": "kimi-k2-6",
6
6
  "billingModel": "TEE/kimi-k2-6",
7
- "tinfoilEnclaveModel": "kimi-k2-6",
7
+ "teeTargetModel": "kimi-k2-6",
8
8
  "created": 1764547200,
9
- "ownedBy": "nanogpt-tinfoil",
9
+ "ownedBy": "nanogpt-private-mode",
10
10
  "aliases": ["private/kimi-k2.6", "TEE/kimi-k2-6", "TEE/kimi-k2.6"]
11
11
  },
12
12
  {
@@ -14,9 +14,9 @@
14
14
  "name": "GPT OSS 120B Private",
15
15
  "upstreamModel": "gpt-oss-120b",
16
16
  "billingModel": "TEE/gpt-oss-120b",
17
- "tinfoilEnclaveModel": "gpt-oss-120b",
17
+ "teeTargetModel": "gpt-oss-120b",
18
18
  "created": 1764547200,
19
- "ownedBy": "nanogpt-tinfoil",
19
+ "ownedBy": "nanogpt-private-mode",
20
20
  "aliases": ["TEE/gpt-oss-120b", "phala/gpt-oss-120b"]
21
21
  },
22
22
  {
@@ -24,9 +24,9 @@
24
24
  "name": "Llama 3.3 70B Private",
25
25
  "upstreamModel": "llama3-3-70b",
26
26
  "billingModel": "TEE/llama3-3-70b",
27
- "tinfoilEnclaveModel": "llama3-3-70b",
27
+ "teeTargetModel": "llama3-3-70b",
28
28
  "created": 1764547200,
29
- "ownedBy": "nanogpt-tinfoil",
29
+ "ownedBy": "nanogpt-private-mode",
30
30
  "aliases": ["private/llama-3.3-70b", "TEE/llama3-3-70b"]
31
31
  },
32
32
  {
@@ -34,9 +34,9 @@
34
34
  "name": "GLM 5.1 Private",
35
35
  "upstreamModel": "glm-5-1",
36
36
  "billingModel": "TEE/glm-5-1",
37
- "tinfoilEnclaveModel": "glm-5-1",
37
+ "teeTargetModel": "glm-5-1",
38
38
  "created": 1764547200,
39
- "ownedBy": "nanogpt-tinfoil",
39
+ "ownedBy": "nanogpt-private-mode",
40
40
  "aliases": ["private/glm-5.1", "TEE/glm-5-1", "TEE/glm-5.1"]
41
41
  },
42
42
  {
@@ -44,9 +44,9 @@
44
44
  "name": "GLM 5.1 Thinking Private",
45
45
  "upstreamModel": "glm-5-1",
46
46
  "billingModel": "TEE/glm-5-1-thinking",
47
- "tinfoilEnclaveModel": "glm-5-1",
47
+ "teeTargetModel": "glm-5-1",
48
48
  "created": 1764547200,
49
- "ownedBy": "nanogpt-tinfoil",
49
+ "ownedBy": "nanogpt-private-mode",
50
50
  "aliases": ["private/glm-5.1-thinking", "TEE/glm-5-1-thinking", "TEE/glm-5.1-thinking"]
51
51
  },
52
52
  {
@@ -54,10 +54,10 @@
54
54
  "name": "Gemma 4 31B Private",
55
55
  "upstreamModel": "gemma4-31b",
56
56
  "billingModel": "TEE/gemma4-31b",
57
- "tinfoilEnclaveModel": "gemma4-31b",
57
+ "teeTargetModel": "gemma4-31b",
58
58
  "thinkingMode": "gemma",
59
59
  "created": 1764547200,
60
- "ownedBy": "nanogpt-tinfoil",
60
+ "ownedBy": "nanogpt-private-mode",
61
61
  "aliases": ["TEE/gemma4-31b", "gemma4-31b"]
62
62
  },
63
63
  {
@@ -65,10 +65,10 @@
65
65
  "name": "Gemma 4 31B Thinking Private",
66
66
  "upstreamModel": "gemma4-31b",
67
67
  "billingModel": "TEE/gemma4-31b:thinking",
68
- "tinfoilEnclaveModel": "gemma4-31b",
68
+ "teeTargetModel": "gemma4-31b",
69
69
  "thinkingMode": "gemma",
70
70
  "created": 1764547200,
71
- "ownedBy": "nanogpt-tinfoil",
71
+ "ownedBy": "nanogpt-private-mode",
72
72
  "aliases": ["TEE/gemma4-31b:thinking", "gemma4-31b:thinking"]
73
73
  },
74
74
  {
@@ -76,10 +76,10 @@
76
76
  "name": "DeepSeek V4 Pro Private",
77
77
  "upstreamModel": "deepseek-v4-pro",
78
78
  "billingModel": "TEE/deepseek-v4-pro",
79
- "tinfoilEnclaveModel": "deepseek-v4-pro",
79
+ "teeTargetModel": "deepseek-v4-pro",
80
80
  "thinkingMode": "deepseek-v4-pro",
81
81
  "created": 1764547200,
82
- "ownedBy": "nanogpt-tinfoil",
82
+ "ownedBy": "nanogpt-private-mode",
83
83
  "aliases": ["TEE/deepseek-v4-pro", "deepseek-v4-pro"]
84
84
  },
85
85
  {
@@ -87,10 +87,10 @@
87
87
  "name": "DeepSeek V4 Pro Thinking Private",
88
88
  "upstreamModel": "deepseek-v4-pro",
89
89
  "billingModel": "TEE/deepseek-v4-pro:thinking",
90
- "tinfoilEnclaveModel": "deepseek-v4-pro",
90
+ "teeTargetModel": "deepseek-v4-pro",
91
91
  "thinkingMode": "deepseek-v4-pro",
92
92
  "created": 1764547200,
93
- "ownedBy": "nanogpt-tinfoil",
93
+ "ownedBy": "nanogpt-private-mode",
94
94
  "aliases": ["TEE/deepseek-v4-pro:thinking", "deepseek-v4-pro:thinking"]
95
95
  }
96
96
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nanogpt/private-mode",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "OpenAI-compatible localhost proxy for NanoGPT Private Mode.",
5
5
  "type": "module",
6
6
  "publishConfig": {