Skip to content

Commit 6ffd995

Browse files
committed
improvement(config): derive enterprise flags from one registry and merge the vLLM and LiteLLM providers
1 parent 3153f6e commit 6ffd995

67 files changed

Lines changed: 2095 additions & 2364 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/scripts/http-e2e.sh‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,10 @@ case "$group" in
187187
scim)
188188
export NEXT_PUBLIC_FORCE_HOSTED=true
189189
export BILLING_ENABLED=true NEXT_PUBLIC_BILLING_ENABLED=true
190-
export ENTERPRISE_ENABLED=true NEXT_PUBLIC_ENTERPRISE_ENABLED=true
191-
export SCIM_ENABLED=true NEXT_PUBLIC_SCIM_ENABLED=true
192-
export SSO_ENABLED=true NEXT_PUBLIC_SSO_ENABLED=true
193-
export ORGANIZATIONS_ENABLED=true NEXT_PUBLIC_ORGANIZATIONS_ENABLED=true
190+
export ENTERPRISE_ENABLED=true
191+
export SCIM_ENABLED=true
192+
export SSO_ENABLED=true
193+
export ORGANIZATIONS_ENABLED=true
194194
export INTERNAL_API_SECRET=scim-http-ci-local-secret-at-least-32-characters
195195
export DB_TX_TRIPWIRE=throw
196196
export NEXT_PUBLIC_CHAT_DISABLED=true
@@ -282,7 +282,6 @@ case "$group" in
282282
export NEXT_PUBLIC_FORCE_HOSTED=false
283283
export COPILOT_TOOL_PERMISSIONS_ENABLED=true
284284
export KNOWLEDGE_MEMBER_ACCESS=true CREDENTIAL_GROUPS=true ACCESS_CONTROL_ENABLED=true
285-
export NEXT_PUBLIC_ACCESS_CONTROL_ENABLED=true NEXT_PUBLIC_ORGANIZATIONS_ENABLED=true
286285
case "$group" in assistant-actions|organization-search) needs_browser=true ;; *) needs_browser=false ;; esac
287286
if [ "$needs_browser" = true ]; then start_browser_install "$group" --only-shell chromium; fi
288287
export INTERNAL_API_SECRET=desktop-inbox-http-ci-local-secret-at-least-32-characters
@@ -335,7 +334,6 @@ case "$group" in
335334
export NEXT_PUBLIC_FORCE_HOSTED=false
336335
export KNOWLEDGE_MEMBER_ACCESS=true CREDENTIAL_GROUPS=true ACCESS_CONTROL_ENABLED=true
337336
export SIM_LINKS=true
338-
export NEXT_PUBLIC_ACCESS_CONTROL_ENABLED=true
339337
export API_ENCRYPTION_KEY="$ENCRYPTION_KEY"
340338
start_browser_install "$group" --no-shell chromium
341339
extension_identity=$(bun - <<'JS'

‎apps/docs/content/docs/platform/enterprise/access-control.mdx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ On billing-disabled deployments, enable permission groups through the enterprise
147147

148148
```bash
149149
ACCESS_CONTROL_ENABLED=true
150-
NEXT_PUBLIC_ACCESS_CONTROL_ENABLED=true
151150
```
152151

153152
The enterprise master configuration can enable the feature; an explicit feature value takes precedence. Billing-enabled self-hosted deployments still require Enterprise. See [self-hosted enterprise setup](/platform/enterprise/self-hosted).

‎apps/docs/content/docs/platform/enterprise/audit-logs.mdx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ On billing-disabled deployments, enable audit logs through enterprise configurat
118118

119119
```bash
120120
AUDIT_LOGS_ENABLED=true
121-
NEXT_PUBLIC_AUDIT_LOGS_ENABLED=true
122121
```
123122

124123
Explicit feature values take precedence over the enterprise master setting. Billing-enabled self-hosted deployments retain the Enterprise gate. See [self-hosted enterprise setup](/platform/enterprise/self-hosted).

‎apps/docs/content/docs/platform/enterprise/custom-blocks.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Callout } from '@/components/ui/callout'
77

88
Publish a workflow as a custom block so teammates can provide its inputs and use selected outputs without access to its source workflow. The block always runs the source's latest deployment. Use it for a shared knowledge lookup, an authenticated internal API, an enrichment step, or a prompt and guardrail maintained in one place.
99

10-
Publishing and managing a block requires admin access to its source workspace. Billing-enabled deployments require an Enterprise organization. On billing-disabled deployments, enable the custom-block feature through enterprise configuration or `CUSTOM_BLOCKS_ENABLED=true` and `NEXT_PUBLIC_CUSTOM_BLOCKS_ENABLED=true`. An organization is still required; see [self-hosted enterprise setup](/platform/enterprise/self-hosted).
10+
Publishing and managing a block requires admin access to its source workspace. Billing-enabled deployments require an Enterprise organization. On billing-disabled deployments, enable the custom-block feature through enterprise configuration or `CUSTOM_BLOCKS_ENABLED=true`. An organization is still required; see [self-hosted enterprise setup](/platform/enterprise/self-hosted).
1111

1212
## Publish a block
1313

‎apps/docs/content/docs/platform/enterprise/data-drains.mdx‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,9 @@ Enable the feature through enterprise configuration or explicitly set:
248248

249249
```bash
250250
DATA_DRAINS_ENABLED=true
251-
NEXT_PUBLIC_DATA_DRAINS_ENABLED=true
252251
```
253252

254-
An explicit feature value takes precedence over `ENTERPRISE_ENABLED`. When disabled, the page is hidden, mutating drain requests return `404`, and the dispatcher does no work. Billing-enabled deployments retain the Enterprise gate. Keep server and public feature configuration aligned; `bunx sim-setup doctor` checks the pair. See [self-hosted enterprise setup](/platform/enterprise/self-hosted).
253+
An explicit feature value takes precedence over `ENTERPRISE_ENABLED`. When disabled, the page is hidden, mutating drain requests return `404`, and the dispatcher does no work. Billing-enabled deployments retain the Enterprise gate. See [self-hosted enterprise setup](/platform/enterprise/self-hosted).
255254

256255
The dispatcher requires scheduled calls to `GET /api/cron/run-data-drains`. Set the same `CRON_SECRET` on the app and its caller; the endpoint returns `401` when it is unset. Generate a secret if needed, then install it in both configurations:
257256

‎apps/docs/content/docs/platform/enterprise/data-retention.mdx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ On billing-disabled deployments, enable retention through enterprise configurati
128128

129129
```bash
130130
DATA_RETENTION_ENABLED=true
131-
NEXT_PUBLIC_DATA_RETENTION_ENABLED=true
132131
```
133132

134133
An explicit feature value takes precedence over the enterprise master configuration. No plan-based default window is introduced: configure the windows you intend to apply.

‎apps/docs/content/docs/platform/enterprise/forks.mdx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ On billing-disabled deployments, enable forking through enterprise configuration
188188

189189
```bash
190190
FORKING_ENABLED=true
191-
NEXT_PUBLIC_FORKING_ENABLED=true
192191
```
193192

194193
Explicit feature values take precedence over the master configuration. Billing-enabled self-hosted deployments still require Enterprise. See [self-hosted enterprise setup](/platform/enterprise/self-hosted).

‎apps/docs/content/docs/platform/enterprise/index.mdx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ On a self-hosted deployment with billing disabled, enable enterprise features th
2626

2727
```bash
2828
ENTERPRISE_ENABLED=true
29-
NEXT_PUBLIC_ENTERPRISE_ENABLED=true
3029
```
3130

3231
Individual feature flags override the master switch. Most enterprise settings also need an organization that owns the workspace. Choose one instance-wide organization or provision separate organizations through the Admin API.

‎apps/docs/content/docs/platform/enterprise/scim/index.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Configure [SSO](/platform/enterprise/sso) separately for authentication. SCIM ca
1616

1717
- On Sim Cloud, use an Enterprise organization and an organization owner or admin account.
1818
- [Verify every email domain](/platform/enterprise/verified-domains) you will provision. Sim refuses account creation or an email change to an unverified domain.
19-
- On self-hosted deployments, enable SSO to reach **Single sign-on → Provisioning**, and enable SCIM. The enterprise master pair enables both; individual setup uses `SSO_ENABLED`, `NEXT_PUBLIC_SSO_ENABLED`, `SCIM_ENABLED`, and `NEXT_PUBLIC_SCIM_ENABLED`. See [Self-hosted SSO setup](/platform/enterprise/sso#self-hosted-setup) and [Deployment and upgrades](#deployment-and-upgrades).
19+
- On self-hosted deployments, enable SSO to reach **Single sign-on → Provisioning**, and enable SCIM. `ENTERPRISE_ENABLED` enables both; individual setup uses `SSO_ENABLED` and `SCIM_ENABLED`. See [Self-hosted SSO setup](/platform/enterprise/sso#self-hosted-setup) and [Deployment and upgrades](#deployment-and-upgrades).
2020

2121
## Plan membership and access
2222

@@ -205,7 +205,7 @@ While the connection is disabled, **Lock managed membership** and **Disable just
205205
Apply database migrations before the new application code. The SCIM tables and suspension fields are additive, allowing older code to run against the expanded schema during rollout.
206206

207207
<Callout type="warn">
208-
Keep `SCIM_ENABLED=false` and `NEXT_PUBLIC_SCIM_ENABLED=false` until all older application instances and workers are drained. Older code does not enforce SCIM suspension or explicit permission-group membership. These explicit flags also override the hosted default.
208+
Keep `SCIM_ENABLED=false` until all older application instances and workers are drained. Older code does not enforce SCIM suspension or explicit permission-group membership. This explicit flag also overrides the hosted default.
209209
</Callout>
210210

211211
After SCIM has suspended accounts or established managed access, rolling back to code that predates SCIM is unsafe: it cannot enforce those restrictions. Disabling synchronization does not undo suspension or restore earlier membership semantics.

‎apps/docs/content/docs/platform/enterprise/self-hosted.mdx‎

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,19 @@ This guide covers the standard billing-disabled configuration. If billing is ena
1313

1414
## Enable the feature set
1515

16-
Set both the server flag and its browser twin, then restart the application:
16+
Set the server flag, then restart the application:
1717

1818
```bash
1919
ENTERPRISE_ENABLED=true
20-
NEXT_PUBLIC_ENTERPRISE_ENABLED=true
2120
```
2221

23-
The server flag controls access and the server-resolved workspace settings. The browser twin also enables controls that read browser configuration directly, including SSO on the login page and the Function block's **Sandbox** selector. On a Compose install or source checkout, `bunx sim-setup doctor` reports mismatched twins. See [Verify your install](/platform/self-hosting/verify).
22+
The server flag controls access and everything the browser shows, including SSO on the login page and the Function block's **Sandbox** selector: the browser reads the server's resolved settings, so there is no `NEXT_PUBLIC_` variable to set. Browser variables left over from older releases do nothing; on a Compose install or source checkout, `bunx sim-setup doctor` reports them. See [Verify your install](/platform/self-hosting/verify).
2423

2524
Individual flags override the master switch. For example, to enable the suite with data drains disabled:
2625

2726
```bash
2827
ENTERPRISE_ENABLED=true
29-
NEXT_PUBLIC_ENTERPRISE_ENABLED=true
3028
DATA_DRAINS_ENABLED=false
31-
NEXT_PUBLIC_DATA_DRAINS_ENABLED=false
3229
```
3330

3431
You can also leave the master switch unset and enable individual features. The [feature flag reference](#feature-flag-reference) lists them all.
@@ -238,29 +235,31 @@ OAuth token cleanup removes expired and revoked credentials independently of sig
238235

239236
Explicit individual flags override the master switch, including when set to `false`. With billing disabled and no enterprise flags set, session policies and the Sim Mailer inbox remain enabled by default. Other features require opt-in.
240237

241-
| Feature | Server variable | Browser variable |
242-
| --- | --- | --- |
243-
| Enterprise suite | `ENTERPRISE_ENABLED` | `NEXT_PUBLIC_ENTERPRISE_ENABLED` |
244-
| Organizations | `ORGANIZATIONS_ENABLED` | `NEXT_PUBLIC_ORGANIZATIONS_ENABLED` |
245-
| Permission groups | `ACCESS_CONTROL_ENABLED` | `NEXT_PUBLIC_ACCESS_CONTROL_ENABLED` |
246-
| SAML and OIDC sign-in | `SSO_ENABLED` | `NEXT_PUBLIC_SSO_ENABLED` |
247-
| Directory provisioning | `SCIM_ENABLED` | `NEXT_PUBLIC_SCIM_ENABLED` |
248-
| Audit logs | `AUDIT_LOGS_ENABLED` | `NEXT_PUBLIC_AUDIT_LOGS_ENABLED` |
249-
| Insights | `USAGE_MONITORING_ENABLED` | `NEXT_PUBLIC_USAGE_MONITORING_ENABLED` |
250-
| Custom blocks | `CUSTOM_BLOCKS_ENABLED` | `NEXT_PUBLIC_CUSTOM_BLOCKS_ENABLED` |
251-
| Session policies — enabled by default | `SESSION_POLICIES_ENABLED` | `NEXT_PUBLIC_SESSION_POLICIES_ENABLED` |
252-
| Retention deletion | `DATA_RETENTION_ENABLED` | `NEXT_PUBLIC_DATA_RETENTION_ENABLED` |
253-
| Data drains | `DATA_DRAINS_ENABLED` | `NEXT_PUBLIC_DATA_DRAINS_ENABLED` |
254-
| Credential groups | `CREDENTIAL_GROUPS` | — |
255-
| Workspace forks | `FORKING_ENABLED` | `NEXT_PUBLIC_FORKING_ENABLED` |
256-
| Sim Mailer inbox — enabled by default | `INBOX_ENABLED` | `NEXT_PUBLIC_INBOX_ENABLED` |
257-
| Sandboxes | `SANDBOXES_ENABLED` | `NEXT_PUBLIC_SANDBOXES_ENABLED` |
238+
Each feature is one server variable. Permission groups also turn on organizations, and organizations are always on when billing is enabled.
239+
240+
| Feature | Variable |
241+
| --- | --- |
242+
| Enterprise suite | `ENTERPRISE_ENABLED` |
243+
| Organizations | `ORGANIZATIONS_ENABLED` |
244+
| Permission groups | `ACCESS_CONTROL_ENABLED` |
245+
| SAML and OIDC sign-in | `SSO_ENABLED` |
246+
| Directory provisioning | `SCIM_ENABLED` |
247+
| Audit logs | `AUDIT_LOGS_ENABLED` |
248+
| Insights | `USAGE_MONITORING_ENABLED` |
249+
| Custom blocks | `CUSTOM_BLOCKS_ENABLED` |
250+
| Session policies — enabled by default | `SESSION_POLICIES_ENABLED` |
251+
| Retention deletion | `DATA_RETENTION_ENABLED` |
252+
| Data drains | `DATA_DRAINS_ENABLED` |
253+
| Credential groups | `CREDENTIAL_GROUPS` |
254+
| Workspace forks | `FORKING_ENABLED` |
255+
| Sim Mailer inbox — enabled by default | `INBOX_ENABLED` |
256+
| Sandboxes | `SANDBOXES_ENABLED` |
258257

259258
### Sandbox readiness
260259

261260
A Sandbox entitlement also requires a remote execution provider with credentials and an immutable Function base image. Until the server verifies readiness, the Function block offers no **Shell** language, and **Settings → Sandboxes** shows an upgrade notice instead of a sandbox list.
262261

263-
`NEXT_PUBLIC_SANDBOXES_ENABLED` exposes the Function block's **Sandbox** selector; it asserts readiness rather than checking it. Set it only after configuring the selected provider and Function base. `bunx sim-setup doctor` compares it with provider readiness.
262+
The Function block's **Sandbox** selector appears once the server confirms both the entitlement and a ready provider. `NEXT_PUBLIC_SANDBOXES_ENABLED` is only a readiness marker that `bunx sim-setup doctor` compares with the provider; the app does not read it.
264263

265264
JavaScript without `import`, `require`, a selected sandbox, or a sandbox file-path reference runs in local Node child workers in the app container when Sandbox flags are off. Python, Shell, JavaScript with external imports, and selected custom Sandboxes require the remote Function base and fail with a configuration error until it is ready. See [Sandboxes](/platform/self-hosting/sandboxes).
266265

@@ -269,7 +268,7 @@ JavaScript without `import`, `require`, a selected sandbox, or a sandbox file-pa
269268
| Symptom | Check |
270269
| --- | --- |
271270
| A settings section is missing | Check its server flag and restart the app after changing environment variables. These values load at boot; a rebuild is not needed. |
272-
| The login page has no SSO option, or Function has no Sandbox selector | Set the matching `NEXT_PUBLIC_` flag. Run `bunx sim-setup doctor` to check twins and Sandbox readiness. |
271+
| The login page has no SSO option, or Function has no Sandbox selector | Check `SSO_ENABLED` (or `ENTERPRISE_ENABLED`) and Sandbox readiness, then restart the app. Run `bunx sim-setup doctor` to check Sandbox readiness. |
273272
| **Settings → Sandboxes** shows an upgrade notice | Check Sandbox entitlement, provider credentials, and the immutable Function base. |
274273
| An enabled feature has no effect in a workspace | Confirm that the workspace belongs to an organization. Use the backfill or workspace move procedure if needed. |
275274
| Retention deletes nothing | Check `DATA_RETENTION_ENABLED`, explicit windows, scheduler requests, and `CRON_SECRET`. |

0 commit comments

Comments
 (0)