Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/guide/ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ const result = await ai.run('google/gemini-2.5-flash', {
});
```

Pass AI Gateway options as the third argument: `ai.run(model, inputs, { gateway: { skipCache: true } })`. On a team platform, the platform chooses the gateway and sets its metadata and logging; options such as `skipCache` and `cacheTtl` still apply.
Pass AI Gateway options as the third argument: `ai.run(model, inputs, { gateway: { skipCache: true } })`. On a team platform, the platform chooses the gateway and sets its metadata and logging; options such as `skipCache` and `cacheTtl` still apply. The platform's logging setting also covers `void dev` in a linked project; an unlinked project uses your own Cloudflare account and its gateway settings.

For provider-native requests on a direct deployment, configure [`ai.gateway`](../integrations/cloudflare.md#ai-self-host).

Expand Down
35 changes: 34 additions & 1 deletion docs/guide/platform/administration/plans.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Choose a plan to inspect or edit it, copy one into a new plan, or choose the def

## Use the Dashboard

Open **Plans** to see each plan's stable ID, account count, and signup default. Choose **Add plan** to copy an existing plan, or **Edit** to change its display name, limits, build size, and permission to use short project slugs.
Open **Plans** to see each plan's stable ID, account count, and signup default. Choose **Add plan** to copy an existing plan, or **Edit** to change its display name, limits, build size, permission to use short project slugs, and [AI Gateway logging default](#ai-gateway-logging).

Choose **Review changes** to compare the current and proposed settings and see how many accounts are affected. Review any quota warnings, then choose **Apply changes**. If someone changed the catalog while you were reviewing, open the plan again and create a fresh review.

Expand Down Expand Up @@ -89,6 +89,39 @@ Storage figures shown for D1, R2, and KV are informational and cannot be edited

The preview shows the affected account count and checks a sample for accounts already above a proposed quota. Lowering a quota can restrict existing apps, including accounts outside that sample. Usage history and billing periods are preserved, so a plan change does not reset usage. Manual administrator suspensions remain in effect.

## AI Gateway Logging {#ai-gateway-logging}

Each plan can set how AI Gateway logs AI requests for its accounts' projects: `inherit`, `off`, `metadata`, or `full`. See [AI Gateway logging](../../../reference/cli/platform-users.md#ai-gateway-logging) for what each mode stores. Plans start with `inherit`, which follows the gateway's own setting.

A project's own setting from `void platform project ai-logging` always wins over the plan default. Accounts whose plan is not in the catalog use the signup default plan's setting.

In the dashboard, choose **Edit** on a plan and pick its **AI Gateway logging default**. In a plan file, set `aiLogging`:

```json
{
"aiLogging": "metadata"
}
```

```sh
void platform config plans set team --file team-plan.json --plan
void platform config plans set team --file team-plan.json --yes
```

`"aiLogging": "inherit"` clears the plan default. Leaving `aiLogging` out keeps the current value. The interactive menu also offers **AI Gateway logging**. The preview shows the change, such as `AI Gateway logging: inherit → metadata`, and how many projects will receive it.

After applying, the CLI publishes the default to every project it affects, then prints:

```txt
AI logging published to 120 projects; expected by 14:03:20 UTC (normally within 2 minutes).
```

A plan default applies to a project once the command prints this line, then normally within 2 minutes. Until then, projects keep their previous behavior and `void platform project show <project-id>` reports `pending_plan_publish`. If publishing stops, the command exits with a nonzero status. Continue it with `void platform config plans sync --yes`, or choose **Continue AI logging publish** on the **Plans** page. The platform also continues it every hour.

Copying a plan copies its AI logging default. Changing the signup default also changes the setting for accounts whose plan is not in the catalog. When you remove a plan with a replacement, its accounts use the replacement plan's default. Moving a user to another plan, or transferring a project to a new owner, applies the new plan's default.

`void platform config plans show <plan-id>` and the user detail page in the dashboard show the plan's AI Gateway logging default. Plan defaults need a platform release that supports them. On an older platform, the CLI stops and asks you to run `void platform upgrade` first.

## Archive or Remove a Plan

Archive a plan to stop assigning it to new accounts while preserving its current accounts:
Expand Down
8 changes: 5 additions & 3 deletions docs/guide/platform/administration/projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ Keep prompt and response bodies out of a project's AI Gateway logs while retaini
void platform project ai-logging <project-id> metadata
```

Only platform administrators can change this setting. It covers the project's AI requests through the platform, including calls with the app's own provider key.
Only platform administrators can change this setting. It covers the project's AI requests through the platform, including calls with the app's own provider key and calls from `void dev`.

Use `inherit` for the gateway default, `off` to stop log collection, or `full` to include bodies. Read the saved mode with `void platform project show <project-id> --json`. See [AI Gateway logging](../../../reference/cli/platform-users.md#ai-gateway-logging) for billing and Logpush details.
Use `inherit` for the gateway's own setting, `off` to store no log entry, or `full` to include bodies. A project's own setting wins over its plan's [AI Gateway logging default](./plans.md#ai-gateway-logging); `inherit` removes the project's own setting.

The command prints when new requests are expected to follow the change, normally within 2 minutes. Check it with `void platform project show <project-id>`, which reports a line such as `AI Gateway logging: metadata (from plan "pro") — applied`. The project page in the admin dashboard shows the same line. See [AI Gateway logging](../../../reference/cli/platform-users.md#ai-gateway-logging) for each state, what the setting covers, and billing and Logpush details.

### Transferring Project Ownership

Expand All @@ -49,7 +51,7 @@ void platform project owner <project-id> <new-owner-user-id> --yes

The preview shows both owners, their plans and suspension state, blockers, and the changes to routing and usage counters. Wait for active rollbacks and builds to finish. For an ordinary active deployment, wait or use `void platform deployment cancel <id>`; rollback deployments cannot be canceled. A managed Sandbox controller also blocks transfer until its cleanup completes, even if no Sandbox container is running; the preview identifies the deployment that owns it.

After the transfer, the former owner becomes a project administrator. Existing project-scoped CI deploy credentials are revoked; create replacements as the new owner. The new owner's plan and limits apply immediately. Usage before the transfer remains charged to the former owner; later usage is charged to the new owner. If an apply reports partial convergence, inspect the project and operator event log before repeating it.
After the transfer, the former owner becomes a project administrator. Existing project-scoped CI deploy credentials are revoked; create replacements as the new owner. The new owner's plan and limits apply immediately. Its AI Gateway logging default applies to new AI requests, normally within 2 minutes, unless the project has its own setting. Usage before the transfer remains charged to the former owner; later usage is charged to the new owner. If an apply reports partial convergence, inspect the project and operator event log before repeating it.

By default, new users on a self-hosted installation start with the `custom` profile, which
does not cap application requests, AI usage, deployment frequency, or retained
Expand Down
4 changes: 4 additions & 0 deletions docs/guide/platform/installation/maintenance.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ void platform upgrade [id]

An upgrade validates the runtime, applies supported pending migrations, deploys the Workers, and checks their health. Existing Worker secrets are preserved.

Install, upgrade, and repair also publish the saved [AI Gateway logging](/reference/cli/platform-users#ai-gateway-logging) settings (**Publishing AI logging settings**). For about 2 minutes afterward, `void platform project show` reports projects with a setting other than `inherit` as `pending`, as well as projects it switched back to `inherit`.

Before starting, Void checks access to the installation's Cloudflare account, Workers, and existing R2 buckets. If credentials are rejected, set `CLOUDFLARE_API_TOKEN` to a management token scoped to that account and retry. This overrides the installation's saved management token.

Some upgrades pause application traffic until the new version passes health checks. If a command fails while traffic is paused:
Expand Down Expand Up @@ -144,6 +146,8 @@ Keep the earlier runtime files if you need rollback. If the installed version is

Do not roll back to 0.26.0 or earlier after upgrading to a later release. Void does not refuse this rollback, but those releases reject the credentials that later releases give your apps. Every project deployed or rotated since the upgrade loses AI, email, ISR revalidation, remote D1, KV, and R2, and prerendering until you upgrade again. If you have rolled back that far, upgrade again, then run `void platform system rotate-proxy-tokens --all --yes` and check with `--plan` until nothing is pending or failed.

After a rollback to 1.8.0, plan [AI Gateway logging](/guide/platform/administration/plans#ai-gateway-logging) defaults are not applied: projects that follow a plan default use the gateway's own setting, which logs prompts and responses on a new installation. Project settings still apply. Plan defaults stay saved, and the next upgrade publishes them again. A rollback to a release before 1.8.0 applies no AI logging settings.

Let running rotations finish before you roll back. If an older proxy runs next to a newer API, prerendering and remote D1, KV, and R2 fail until both run the same release. After a rollback to the release just before credential rotation, projects deployed since the upgrade lose prerendering and remote D1, KV, and R2 until they are deployed again or you upgrade again. A rotated project deployed during any rollback stays broken after you upgrade again, and 0.26.0 and earlier also drop rotations that have not finished. After upgrading again from any rollback, run the same `rotate-proxy-tokens` commands.

:::
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Use this page as a command reference. If you are setting up a project for the fi

## Cheat Sheet {#cheat-sheet}

Platform administrators can also [choose AI Gateway logging per project](./cli/platform-users.md#ai-gateway-logging) with `void platform project ai-logging`.
Platform administrators can also choose AI Gateway logging [per project](./cli/platform-users.md#ai-gateway-logging) with `void platform project ai-logging`, or [per plan](../guide/platform/administration/plans.md#ai-gateway-logging) with `void platform config plans`.

| Command | Purpose |
| --------------------------------- | ----------------------------------------------------------------------------- |
Expand Down
6 changes: 3 additions & 3 deletions docs/reference/cli/platform-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ void platform config plans default <plan-id>
void platform config plans sync
```

Use `--plan` to preview changes and affected accounts; scripted mutations require `--yes`. Every command supports `--connection <slug-or-url>` and `--json`. `show` reports the effective limits, default, assignments, and pending account updates. `reset` restores a built-in plan's original limits and build instance size. Archived plans keep their existing accounts but cannot receive new assignments; change the default before archiving it. `remove` requires a replacement for a plan that has accounts or is the default. Changing the default affects only new accounts.
Use `--plan` to preview changes and affected accounts; scripted mutations require `--yes`. Every command supports `--connection <slug-or-url>` and `--json`. `show` reports the effective limits, default, assignments, and pending account and AI logging updates. `show <plan-id>` also reports the plan's AI Gateway logging default. `reset` restores a built-in plan's original limits and build instance size. Archived plans keep their existing accounts but cannot receive new assignments; change the default before archiving it. `remove` requires a replacement for a plan that has accounts or is the default. Changing the default affects new accounts, plus the AI Gateway logging of accounts whose plan is not in the catalog.

For `add` and `set`, `--file` reads a JSON object with optional `name`, `limits`, `buildInstanceType`, and boolean `allowShortSlugs`. `limits` is a partial object of nonnegative whole numbers; `0` means unlimited by the plan. Build timeouts remain capped at the platform maximum of 60 minutes; `0` uses that maximum. Omitted settings keep their current values or the copied plan's values. `buildInstanceType` is `standard-3` or `standard-4`. `allowShortSlugs` permits future assignments of project slugs of five characters or fewer; existing URLs remain available. Storage quotas are not editable. See [Plans and Limits](../../guide/platform/administration/plans.md) for supported limits and examples.
For `add` and `set`, `--file` reads a JSON object with optional `name`, `limits`, `buildInstanceType`, and boolean `allowShortSlugs`. `limits` is a partial object of nonnegative whole numbers; `0` means unlimited by the plan. Build timeouts remain capped at the platform maximum of 60 minutes; `0` uses that maximum. Omitted settings keep their current values or the copied plan's values. `buildInstanceType` is `standard-3` or `standard-4`. `allowShortSlugs` permits future assignments of project slugs of five characters or fewer; existing URLs remain available. `aiLogging` sets the plan's [AI Gateway logging](./platform-users.md#ai-gateway-logging) default: `off`, `metadata`, or `full`. `"inherit"` clears it; leaving it out keeps the current value. Storage quotas are not editable. See [Plans and Limits](../../guide/platform/administration/plans.md) for supported limits and examples.

An apply checks the preview's revision and rejects concurrent changes. Lower quotas can restrict accounts already above them; usage history and billing periods are preserved. The CLI continues account updates until complete. If an update fails or stops making progress, the configuration remains saved and the command exits unsuccessfully. Run `sync --yes` to continue before editing plans again. Inspect `show` and operator events after an uncertain request outcome.
An apply checks the preview's revision and rejects concurrent changes. Lower quotas can restrict accounts already above them; usage history and billing periods are preserved. The CLI continues account updates and AI logging publishing until complete, then prints how many projects received the AI logging default and when new requests are expected to follow it. If an update fails or stops making progress, the configuration remains saved and the command exits unsuccessfully. Run `sync --yes` to continue before editing plans again. Inspect `show` and operator events after an uncertain request outcome.

## Authentication configuration {#authentication-configuration}

Expand Down
Loading
Loading