You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README_EN.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@ This project does not maintain a full fork of either upstream project. Instead,
16
16
- Optional deep probes for Antigravity soft bans and xAI availability anomalies.
17
17
- A routing-policy page for upstream routing behavior and provider-scoped request-state protection.
18
18
- A bundled dynamic proxy-pool plugin that aggregates HTTP/SOCKS nodes behind one fixed loopback SOCKS5 endpoint with rotation, health isolation, and failover.
19
+
- A bundled OAuth model-policy plugin that initially removes unavailable models per xAI account plan and constrains both model listing and auth scheduling.
19
20
20
21
## Repository layout
21
22
@@ -36,7 +37,8 @@ This project does not maintain a full fork of either upstream project. Instead,
36
37
│ └── overlay/
37
38
│
38
39
├── cliproxyapi-pro-plugins/
39
-
│ └── proxy-pool/
40
+
│ ├── proxy-pool/
41
+
│ └── oauth-model-policy/
40
42
│
41
43
├── scripts/validation/
42
44
└── .github/workflows/
@@ -62,11 +64,12 @@ Main capabilities:
62
64
- Supports SQLite-backed quota cache.
63
65
- Supports model price persistence.
64
66
- Supports the QuotaProvider plugin protocol and a Gemini CLI legacy adapter.
67
+
- Supports a generic `AuthModelFilter` plugin protocol; the bundled `oauth-model-policy` initially filters xAI OAuth models by account plan.
65
68
- Forces required upstream startup config: `usage-statistics-enabled=true` and the Pro management panel repository.
66
69
- Adds a backend account-inspection scheduler and executor with token refresh before probing.
67
70
- Adds unified routing-policy and request-state-protection APIs.
68
71
- Optionally starts the Komari agent.
69
-
- Prebundles the `proxy-pool` dynamic library in standard macOS, Windows amd64, and Linux releases plus Docker images; Windows ARM64, FreeBSD, and `_no-plugin` assets do not currently bundle it.
72
+
- Prebundles the `proxy-pool`and `oauth-model-policy`dynamic libraries in standard macOS, Windows amd64, and Linux releases plus Docker images; Windows ARM64, FreeBSD, and `_no-plugin` assets do not currently bundle dynamic plugins.
This directory does not maintain a full fork of upstream. During Docker build it downloads an upstream release, copies in the local `embeddedusage/` package, applies the patch script in `patches/`, and builds a multi-arch image for the Pro deployment.
6
6
7
-
Standard macOS, Windows amd64, and Linux Pro releases plus Docker images prebundle the `cliproxyapi-pro-plugins/proxy-pool` dynamic plugin. It exposes a fixed loopback SOCKS5 endpoint while rotation, health isolation, and failover stay inside the plugin, so upstream's proxy execution path is unchanged. Windows ARM64, FreeBSD, and `_no-plugin` assets do not currently bundle this feature.
7
+
Standard macOS, Windows amd64, and Linux Pro releases plus Docker images prebundle the `proxy-pool`and `oauth-model-policy`dynamic plugins. The former exposes a fixed loopback SOCKS5 endpoint; the latter initially removes models unavailable to each xAI OAuth plan. Windows ARM64, FreeBSD, and `_no-plugin` assets do not currently bundle dynamic plugins.
8
8
9
9
## What this customization adds
10
10
@@ -138,6 +138,12 @@ changes: Core adapts its existing `Executor.HttpRequest`; a future native implem
138
138
priority automatically. See [QUOTA_PROVIDER.md](QUOTA_PROVIDER.md) for the schema and compatibility
139
139
rules.
140
140
141
+
### OAuth plan model policy plugin
142
+
143
+
The patch layer adds a generic `AuthModelFilter` capability to the upstream plugin SDK/ABI. Core provides the current auth, its native model set, and a controlled HTTP callback, while enforcing that a plugin may only subtract existing models. Plan discovery and policy rules stay in the bundled `oauth-model-policy` plugin.
144
+
145
+
The first version supports xAI OAuth with `free`, `supergrok`, `x-premium-plus`, `supergrok-heavy`, `paid-unknown`, and `_unknown` fallback rules. Processing order is upstream `excluded_models`, plugin plan filtering, OAuth alias/prefix, then model registration. The final registration constrains both `/v1/models` aggregation and scheduler candidates. See `cliproxyapi-pro-plugins/oauth-model-policy/README.md` for configuration and discovery details.
146
+
141
147
### Backend account inspection scheduler
142
148
143
149
The patch layer adds backend account-inspection routes under the management API:
@@ -228,6 +234,7 @@ It then starts `CLIProxyAPI` and optionally restores the latest usage backup fro
228
234
-`Dockerfile` — downloads upstream CLIProxyAPI, applies this customization layer, and builds the final image.
229
235
-`Dockerfile.runtime` — assembles the Actions runtime image from prebuilt Linux binaries.
230
236
-`QUOTA_PROVIDER.md` — QuotaProvider plugin protocol and compatibility rules.
237
+
-`../cliproxyapi-pro-plugins/oauth-model-policy/` — dynamic plugin for filtering auth models by OAuth plan.
231
238
-`entrypoint.sh` — starts Komari, starts the main API, and restores WebDAV usage backups.
232
239
-`embeddedusage/` — embedded SQLite usage service and management routes.
233
240
-`patches/apply_upstream_patches.py` — patches upstream source during Docker build.
0 commit comments