tsugite-codex-cli 0.19.0__tar.gz → 0.19.2__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.
- {tsugite_codex_cli-0.19.0 → tsugite_codex_cli-0.19.2}/PKG-INFO +2 -2
- {tsugite_codex_cli-0.19.0 → tsugite_codex_cli-0.19.2}/pyproject.toml +2 -2
- {tsugite_codex_cli-0.19.0 → tsugite_codex_cli-0.19.2}/tsugite_codex_cli/provider.py +13 -2
- {tsugite_codex_cli-0.19.0 → tsugite_codex_cli-0.19.2}/.gitignore +0 -0
- {tsugite_codex_cli-0.19.0 → tsugite_codex_cli-0.19.2}/tsugite_codex_cli/__init__.py +0 -0
- {tsugite_codex_cli-0.19.0 → tsugite_codex_cli-0.19.2}/tsugite_codex_cli/auth.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tsugite-codex-cli
|
|
3
|
-
Version: 0.19.
|
|
3
|
+
Version: 0.19.2
|
|
4
4
|
Summary: Tsugite plugin: ChatGPT subscription auth via Codex CLI token store
|
|
5
5
|
Author: Justyn Shull
|
|
6
6
|
Requires-Python: >=3.11
|
|
7
|
-
Requires-Dist: tsugite-cli==0.19.
|
|
7
|
+
Requires-Dist: tsugite-cli==0.19.2
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "tsugite-codex-cli"
|
|
3
|
-
version = "0.19.
|
|
3
|
+
version = "0.19.2"
|
|
4
4
|
description = "Tsugite plugin: ChatGPT subscription auth via Codex CLI token store"
|
|
5
5
|
authors = [{ name = "Justyn Shull" }]
|
|
6
6
|
requires-python = ">=3.11"
|
|
7
7
|
dependencies = [
|
|
8
|
-
"tsugite-cli==0.19.
|
|
8
|
+
"tsugite-cli==0.19.2",
|
|
9
9
|
]
|
|
10
10
|
|
|
11
11
|
[project.entry-points."tsugite.providers"]
|
|
@@ -21,6 +21,9 @@ API_BASE = "https://chatgpt.com/backend-api/codex"
|
|
|
21
21
|
_REASONING_LEVELS = ["low", "medium", "high"]
|
|
22
22
|
# gpt-5.5 added xhigh; older codex models don't accept it.
|
|
23
23
|
_REASONING_LEVELS_V5_5 = ["low", "medium", "high", "xhigh"]
|
|
24
|
+
# gpt-5.6 added max, and its sol/terra tiers also accept ultra (delegating).
|
|
25
|
+
_REASONING_LEVELS_V5_6 = [*_REASONING_LEVELS_V5_5, "max"]
|
|
26
|
+
_REASONING_LEVELS_V5_6_AGENTIC = [*_REASONING_LEVELS_V5_6, "ultra"]
|
|
24
27
|
|
|
25
28
|
|
|
26
29
|
def _codex_model_info(max_input_tokens: int, effort_levels: list[str] = _REASONING_LEVELS) -> ModelInfo:
|
|
@@ -36,11 +39,15 @@ def _codex_model_info(max_input_tokens: int, effort_levels: list[str] = _REASONI
|
|
|
36
39
|
)
|
|
37
40
|
|
|
38
41
|
|
|
42
|
+
# Context windows are the `context_window` the backend reports for the
|
|
43
|
+
# subscription path, which is smaller than the same model's API tier.
|
|
39
44
|
_CODEX_CLI_MODELS: dict[str, ModelInfo] = {
|
|
45
|
+
"codex_cli/gpt-5.6-sol": _codex_model_info(272_000, effort_levels=_REASONING_LEVELS_V5_6_AGENTIC),
|
|
46
|
+
"codex_cli/gpt-5.6-terra": _codex_model_info(272_000, effort_levels=_REASONING_LEVELS_V5_6_AGENTIC),
|
|
47
|
+
"codex_cli/gpt-5.6-luna": _codex_model_info(272_000, effort_levels=_REASONING_LEVELS_V5_6),
|
|
40
48
|
"codex_cli/gpt-5.5": _codex_model_info(1_050_000, effort_levels=_REASONING_LEVELS_V5_5),
|
|
41
49
|
"codex_cli/gpt-5.4": _codex_model_info(1_050_000),
|
|
42
50
|
"codex_cli/gpt-5.4-mini": _codex_model_info(272_000),
|
|
43
|
-
"codex_cli/gpt-5.4-nano": _codex_model_info(272_000),
|
|
44
51
|
}
|
|
45
52
|
|
|
46
53
|
# Used when /models is unreachable; kept in sync with the registry above.
|
|
@@ -339,7 +346,11 @@ class CodexCliProvider:
|
|
|
339
346
|
headers=self._build_headers(access_token, account_id),
|
|
340
347
|
)
|
|
341
348
|
resp.raise_for_status()
|
|
342
|
-
|
|
349
|
+
# The Codex backend answers {"models":[{"slug":...}]}, not the OpenAI
|
|
350
|
+
# {"data":[{"id":...}]} shape. `visibility: hide` marks special-purpose
|
|
351
|
+
# entries (auto-review, watermark variants) the CLI keeps out of its
|
|
352
|
+
# own picker, so they stay out of ours too.
|
|
353
|
+
return [m["slug"] for m in resp.json()["models"] if isinstance(m, dict) and m.get("visibility") != "hide"]
|
|
343
354
|
except (httpx.HTTPError, KeyError, ValueError, CodexAuthError):
|
|
344
355
|
return list(_FALLBACK_MODELS)
|
|
345
356
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|