lebrel-encrypted 0.2.0__tar.gz → 0.3.0__tar.gz

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 (33) hide show
  1. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/PKG-INFO +16 -13
  2. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/README.md +14 -11
  3. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/pyproject.toml +2 -2
  4. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/src/lebrel_encrypted/__init__.py +1 -1
  5. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/src/lebrel_encrypted/client.py +4 -4
  6. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/tests/interop/main.go +1 -1
  7. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/tests/test_proof.py +2 -2
  8. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/.gitignore +0 -0
  9. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/LICENSE +0 -0
  10. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/THIRD_PARTY_NOTICES.md +0 -0
  11. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/examples/chat.py +0 -0
  12. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/examples/stream.py +0 -0
  13. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/src/lebrel_encrypted/__main__.py +0 -0
  14. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/src/lebrel_encrypted/_vendor/__init__.py +0 -0
  15. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/src/lebrel_encrypted/_vendor/ehbp/LICENSE +0 -0
  16. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/src/lebrel_encrypted/_vendor/ehbp/__init__.py +0 -0
  17. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/src/lebrel_encrypted/_vendor/ehbp/_http.py +0 -0
  18. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/src/lebrel_encrypted/_vendor/ehbp/client.py +0 -0
  19. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/src/lebrel_encrypted/_vendor/ehbp/derive.py +0 -0
  20. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/src/lebrel_encrypted/_vendor/ehbp/errors.py +0 -0
  21. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/src/lebrel_encrypted/_vendor/ehbp/identity.py +0 -0
  22. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/src/lebrel_encrypted/_vendor/ehbp/protocol.py +0 -0
  23. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/src/lebrel_encrypted/_vendor/ehbp/py.typed +0 -0
  24. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/src/lebrel_encrypted/_vendor/ehbp/session.py +0 -0
  25. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/src/lebrel_encrypted/_vendor/ehbp/transport.py +0 -0
  26. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/src/lebrel_encrypted/cli.py +0 -0
  27. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/src/lebrel_encrypted/proof.py +0 -0
  28. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/src/lebrel_encrypted/proxy.py +0 -0
  29. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/tests/interop/go.mod +0 -0
  30. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/tests/interop/go.sum +0 -0
  31. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/tests/test_cli.py +0 -0
  32. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/tests/test_client.py +0 -0
  33. {lebrel_encrypted-0.2.0 → lebrel_encrypted-0.3.0}/tests/test_proxy.py +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lebrel-encrypted
3
- Version: 0.2.0
4
- Summary: Verified encrypted Python client for Lebrel DeepSeek V4 Flash Uncensored
3
+ Version: 0.3.0
4
+ Summary: Verified encrypted Python client for DeepSeek V4.1 Flash · Lebrel Uncensored
5
5
  Project-URL: Homepage, https://lebrel.ai
6
6
  Project-URL: Repository, https://github.com/LEBREL-AI/lebrel-encrypted-python
7
7
  Project-URL: Documentation, https://lebrel.ai/docs
@@ -28,19 +28,21 @@ Description-Content-Type: text/markdown
28
28
  # Lebrel encrypted Python client
29
29
 
30
30
  Questions are encrypted locally for the verified runtime. Answers are decrypted
31
- locally. This client serves **`lebrel/deepseek-v4-flash-uncensored`** and verifies
32
- Lebrel's pinned Ed25519 signature before encrypting anything for a runtime key.
31
+ locally. This client serves DeepSeek V4.1 Flash · Lebrel Uncensored
32
+ (**`lebrel/deepseek-v4.1-flash-uncensored`**) and verifies Lebrel's pinned
33
+ Ed25519 signature before encrypting anything for a runtime key.
33
34
 
34
35
  Requires Python 3.9 or newer.
35
36
 
36
37
  ```sh
37
- python -m pip install https://lebrel.ai/sdk/lebrel-encrypted-python.zip
38
+ python -m pip install lebrel-encrypted
38
39
  export LEBREL_API_KEY='your-Lebrel-API-key'
39
40
  ```
40
41
 
41
- The same archive can be reviewed, extracted and installed locally with
42
- `python -m pip install .`. The import is `lebrel_encrypted`; there is no need for
43
- the OpenAI package. The interface accepts OpenAI chat-completion parameters and
42
+ The package is published on PyPI as `lebrel-encrypted`; the same source is at
43
+ https://github.com/LEBREL-AI/lebrel-encrypted-python and, as a reviewable archive,
44
+ at https://lebrel.ai/sdk/lebrel-encrypted-python.zip (`python -m pip install <archive>`).
45
+ The import is `lebrel_encrypted`; there is no need for the OpenAI package. The interface accepts OpenAI chat-completion parameters and
44
46
  returns dictionaries.
45
47
 
46
48
  ```python
@@ -54,9 +56,9 @@ with Lebrel() as client: # reads LEBREL_API_KEY
54
56
  print(response["choices"][0]["message"]["content"])
55
57
  ```
56
58
 
57
- The model defaults to the exact Flash edition above. Another model ID is
58
- rejected locally. You can also pass `Lebrel(api_key="...")` or use the shorter
59
- `client.create(...)` interface.
59
+ The model defaults to the exact DeepSeek V4.1 Flash edition above. Another
60
+ model ID is rejected locally. You can also pass `Lebrel(api_key="...")` or use
61
+ the shorter `client.create(...)` interface.
60
62
 
61
63
  ## OpenCode and other OpenAI-compatible applications
62
64
 
@@ -70,7 +72,7 @@ Configure your application with:
70
72
 
71
73
  - Base URL: `http://127.0.0.1:11437/v1`
72
74
  - API key: your usual Lebrel API key
73
- - Model: `lebrel/deepseek-v4-flash-uncensored`
75
+ - Model: `lebrel/deepseek-v4.1-flash-uncensored`
74
76
 
75
77
  The adapter receives normal OpenAI JSON and SSE on loopback, then uses this SDK
76
78
  to encrypt requests to the public API and decrypt responses. It binds only to
@@ -84,7 +86,8 @@ from each application's request. Optional standalone use can read the key from
84
86
  `--api-key-file /private/path/to/key`; an incoming Bearer key takes precedence.
85
87
  The file must contain exactly one key. Do not put the key itself on the command
86
88
  line. The authenticated `/v1/models` route forwards metadata only for the exact
87
- Flash model. Stream disconnects close the encrypted upstream response.
89
+ DeepSeek V4.1 Flash Uncensored model. Stream disconnects close the encrypted
90
+ upstream response.
88
91
 
89
92
  `GET http://127.0.0.1:11437/healthz` requires no key and identifies the local
90
93
  adapter, SDK version, upstream, signing-key ID and loaded proxy source hash.
@@ -1,19 +1,21 @@
1
1
  # Lebrel encrypted Python client
2
2
 
3
3
  Questions are encrypted locally for the verified runtime. Answers are decrypted
4
- locally. This client serves **`lebrel/deepseek-v4-flash-uncensored`** and verifies
5
- Lebrel's pinned Ed25519 signature before encrypting anything for a runtime key.
4
+ locally. This client serves DeepSeek V4.1 Flash · Lebrel Uncensored
5
+ (**`lebrel/deepseek-v4.1-flash-uncensored`**) and verifies Lebrel's pinned
6
+ Ed25519 signature before encrypting anything for a runtime key.
6
7
 
7
8
  Requires Python 3.9 or newer.
8
9
 
9
10
  ```sh
10
- python -m pip install https://lebrel.ai/sdk/lebrel-encrypted-python.zip
11
+ python -m pip install lebrel-encrypted
11
12
  export LEBREL_API_KEY='your-Lebrel-API-key'
12
13
  ```
13
14
 
14
- The same archive can be reviewed, extracted and installed locally with
15
- `python -m pip install .`. The import is `lebrel_encrypted`; there is no need for
16
- the OpenAI package. The interface accepts OpenAI chat-completion parameters and
15
+ The package is published on PyPI as `lebrel-encrypted`; the same source is at
16
+ https://github.com/LEBREL-AI/lebrel-encrypted-python and, as a reviewable archive,
17
+ at https://lebrel.ai/sdk/lebrel-encrypted-python.zip (`python -m pip install <archive>`).
18
+ The import is `lebrel_encrypted`; there is no need for the OpenAI package. The interface accepts OpenAI chat-completion parameters and
17
19
  returns dictionaries.
18
20
 
19
21
  ```python
@@ -27,9 +29,9 @@ with Lebrel() as client: # reads LEBREL_API_KEY
27
29
  print(response["choices"][0]["message"]["content"])
28
30
  ```
29
31
 
30
- The model defaults to the exact Flash edition above. Another model ID is
31
- rejected locally. You can also pass `Lebrel(api_key="...")` or use the shorter
32
- `client.create(...)` interface.
32
+ The model defaults to the exact DeepSeek V4.1 Flash edition above. Another
33
+ model ID is rejected locally. You can also pass `Lebrel(api_key="...")` or use
34
+ the shorter `client.create(...)` interface.
33
35
 
34
36
  ## OpenCode and other OpenAI-compatible applications
35
37
 
@@ -43,7 +45,7 @@ Configure your application with:
43
45
 
44
46
  - Base URL: `http://127.0.0.1:11437/v1`
45
47
  - API key: your usual Lebrel API key
46
- - Model: `lebrel/deepseek-v4-flash-uncensored`
48
+ - Model: `lebrel/deepseek-v4.1-flash-uncensored`
47
49
 
48
50
  The adapter receives normal OpenAI JSON and SSE on loopback, then uses this SDK
49
51
  to encrypt requests to the public API and decrypt responses. It binds only to
@@ -57,7 +59,8 @@ from each application's request. Optional standalone use can read the key from
57
59
  `--api-key-file /private/path/to/key`; an incoming Bearer key takes precedence.
58
60
  The file must contain exactly one key. Do not put the key itself on the command
59
61
  line. The authenticated `/v1/models` route forwards metadata only for the exact
60
- Flash model. Stream disconnects close the encrypted upstream response.
62
+ DeepSeek V4.1 Flash Uncensored model. Stream disconnects close the encrypted
63
+ upstream response.
61
64
 
62
65
  `GET http://127.0.0.1:11437/healthz` requires no key and identifies the local
63
66
  adapter, SDK version, upstream, signing-key ID and loaded proxy source hash.
@@ -4,9 +4,9 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "lebrel-encrypted"
7
- version = "0.2.0"
7
+ version = "0.3.0"
8
8
  authors = [{ name = "Lebrel" }]
9
- description = "Verified encrypted Python client for Lebrel DeepSeek V4 Flash Uncensored"
9
+ description = "Verified encrypted Python client for DeepSeek V4.1 Flash · Lebrel Uncensored"
10
10
  readme = "README.md"
11
11
  license = "MIT"
12
12
  requires-python = ">=3.9"
@@ -13,5 +13,5 @@ from .client import (
13
13
  )
14
14
  from .proof import Check, Manifest, Receipt
15
15
 
16
- __version__ = "0.2.0"
16
+ __version__ = "0.3.0"
17
17
  __all__ = ["Lebrel", "MODEL_ID", "Completion", "CompletionStream", "Receipt", "Manifest", "Check", "LebrelError", "EncryptionError", "TransportError", "APIError", "StreamError"]
@@ -28,7 +28,7 @@ from . import proof
28
28
  from ._vendor.ehbp.errors import EHBPError
29
29
  from ._vendor.ehbp.identity import EncryptedRequest, ServerIdentity
30
30
 
31
- MODEL_ID = "lebrel/deepseek-v4-flash-uncensored"
31
+ MODEL_ID = "lebrel/deepseek-v4.1-flash-uncensored"
32
32
  PRODUCTION_SIGNING_KEY = "beFZtSwt6FnlhIYbX636n7w3/gpaASIkRnIMx52XJwk="
33
33
  PRODUCTION_SIGNING_KEY_ID = "8f72beb9680a0f1911dce59d1fc103a0a89039998003715d35422d3020e5292d"
34
34
  MAX_REQUEST_BYTES = 8 * 1024 * 1024
@@ -404,7 +404,7 @@ class Lebrel:
404
404
 
405
405
  def create(self, *, messages: List[Dict[str, Any]], model: str = MODEL_ID, stream: bool = False, **parameters: Any) -> Any:
406
406
  if model != MODEL_ID:
407
- raise ValueError("This encrypted endpoint serves only DeepSeek V4 Flash Uncensored")
407
+ raise ValueError("This encrypted endpoint serves only DeepSeek V4.1 Flash Uncensored")
408
408
  if not isinstance(messages, list) or not messages or type(stream) is not bool:
409
409
  raise ValueError("messages must be a nonempty list and stream must be boolean")
410
410
  try:
@@ -515,7 +515,7 @@ class Lebrel:
515
515
  return proof.Receipt(document=document, checks=checks, verified=proof.all_passed(checks), manifest=served)
516
516
 
517
517
  def list_models(self) -> Dict[str, Any]:
518
- """Fetch authenticated public metadata, filtered to the exact Flash model."""
518
+ """Fetch authenticated public metadata, filtered to the exact DeepSeek V4.1 Flash Uncensored model."""
519
519
  try:
520
520
  with self._http.stream("GET", self._origin + "/v1/models", headers={"Authorization": "Bearer " + self._key, "Accept": "application/json", "Accept-Encoding": "identity"}) as response:
521
521
  if not 200 <= response.status_code < 300:
@@ -526,7 +526,7 @@ class Lebrel:
526
526
  raise EncryptionError("Model metadata is invalid")
527
527
  matching = [entry for entry in entries if isinstance(entry, dict) and entry.get("id") == MODEL_ID]
528
528
  if len(matching) != 1:
529
- raise EncryptionError("The expected Flash model is unavailable")
529
+ raise EncryptionError("The expected DeepSeek V4.1 Flash Uncensored model is unavailable")
530
530
  return {"object": "list", "data": matching}
531
531
  except httpx.HTTPError:
532
532
  raise TransportError("Could not retrieve authenticated model metadata") from None
@@ -19,7 +19,7 @@ import (
19
19
  "github.com/tinfoilsh/encrypted-http-body-protocol/identity"
20
20
  )
21
21
 
22
- const model = "lebrel/deepseek-v4-flash-uncensored"
22
+ const model = "lebrel/deepseek-v4.1-flash-uncensored"
23
23
 
24
24
  func main() {
25
25
  id, err := identity.NewIdentity()
@@ -19,8 +19,8 @@ def sign(payload, signer=SIGNER):
19
19
 
20
20
  def manifest(**changes):
21
21
  payload = {
22
- "version": 1, "edition": {"id": MODEL_ID, "name": "Lebrel DeepSeek V4 Flash Uncensored", "base_model": "deepseek-ai/DeepSeek-V4-Flash", "fingerprint_id": None},
23
- "weights": {"repository": "lebrel/deepseek-v4-flash-uncensored", "revision": "a" * 64, "files": {"model.safetensors": {"sha256": "1" * 64, "size": 7}}, "total_bytes": 7},
22
+ "version": 1, "edition": {"id": MODEL_ID, "name": "DeepSeek V4.1 Flash · Lebrel Uncensored", "base_model": "deepseek-ai/DeepSeek-V4.1-Flash", "fingerprint_id": None},
23
+ "weights": {"repository": "lebrel/deepseek-v4.1-flash-uncensored", "revision": "a" * 64, "files": {"model.safetensors": {"sha256": "1" * 64, "size": 7}}, "total_bytes": 7},
24
24
  "quantization": {"method": "nvfp4", "weights_dtype": "fp8", "kv_cache_dtype": "fp8"}, "engine": {"name": "vllm", "version": "0.30.0", "image_digest": None},
25
25
  "tokenizer_sha256": "b" * 64, "chat_template_sha256": "c" * 64, "runtime": {"provider": "modal", "instance_id": "i" * 32, "sidecar_sha256": None},
26
26
  "attestation": None, "issued_at": 1000, "expires_at": 4600, "signing_key_id": KEY_ID,