Skip to content

Manage a platform BYOK provider in Platform Settings ​

Bring your own key (BYOK) lets Agentweaver call a model provider with a key that you manage. Use Platform settings to save the provider, its prices, and its write-only key. Then choose the provider for new runs.

Before you begin ​

Your account needs current PlatformAdmin authority. Use an unbound platform session with api.read and projects.admin.

Prepare the provider's HTTPS endpoint, model or deployment name, supported reasoning efforts, prompt capacity, and exact input and output prices per million tokens. Prepare the key only if the provider requires one.

Add and save a provider ​

  1. Open Platform settings.
  2. Select Add provider.
  3. Select Custom endpoint, Azure OpenAI, or Anthropic.
  4. Enter the display name, base URL, and model or deployment.
  5. Keep the provider's reasoning efforts and prompt capacity. These values remain unchanged when you edit other fields.
  6. Select one pricing option:
    • Select Save manual prices and enter exact decimal prices, a rate-card ID, a version, and a source URL.
    • Select Use a saved rate card and enter the saved card ID and version.
  7. Enter the API key if the provider needs one. Leave the field blank when a saved key must remain unchanged.
  8. Select Save provider.

Agentweaver saves prices first, then provider metadata, then the key. The key field clears after submission and the key does not appear in later reads.

Reopen and update a Draft ​

Select Edit on a Draft provider. Available provider metadata is read-only.

Choose a pricing action every time you reopen a Draft:

  • Select Save manual prices to create a rate-card version.
  • Select Use a saved rate card to keep or replace the card link.
  • Select Clear the saved rate card, then select the confirmation checkbox, to clear the link.

When a manual rate-card version conflicts, Agentweaver saves the prices under a new version instead of replacing the existing card.

After you correct pricing for a Draft that has a saved key, select Recheck saved key. The page checks the current credential version and publishes the provider from the stored key. It does not write a second key version.

Recover a pending or uncertain key upload ​

The browser sends platform key writes and existing-key rechecks once through apiCallOnce with an unbound session, credentials: 'omit', cache: 'no-store', and no automatic 401 retry. The key input clears before dispatch and never enters operation tracking or browser storage.

When a key write or recheck does not finish cleanly, the page closes the editor, reloads the provider list, and keeps the original operationId, expectedProviderRevision, and expectedCredentialRevision in memory by confirmed (issuer, actorId, tenantId, scope, projectId, providerId) across navigation and same-identity re-authentication. A full browser reload or tab close clears this in-memory state.

  • uncertain or pending: Select Check key status to query the operation status. While an operation is unresolved, the Edit form blocks new key entry while keeping metadata-only edits available. Only select Reset pending check after an operator confirms the attempt is closed.
  • publication_pending: Select Retry publication to replay the original operation with recheckExistingVersion: true and its exact stored revisions without sending the key again. If the provider changed in the meantime (409), the page stops offering Retry publication and shows the operationId for operator recovery.
  • disable_pending: Wait and select Check key status until the operation finishes.
  • quarantined: Share the shown operationId with a platform operator for recovery. Do not enter a new key for the same operation.
  • published, cancelled, or disabled: The page clears the operation and reloads the provider list.

Rotate a saved API key ​

For an Available provider or a Draft provider with an enabled key, select Rotate API key:

  1. The form reads the current credential status and revisions without editing provider metadata or switching the default.
  2. When the status is enabled, enter the replacement key in New API key and select Save new API key. The form clears the typed key immediately.
  3. If the status is not_set, disabled, pending, or quarantined, key entry stays blocked. Resolve any pending or quarantined operation on the provider card first.

Disable an API key ​

Platform administrators can disable an enabled platform BYOK provider API key in Platform settings:

  1. Select Disable API key on an Available provider or a Draft provider that has a saved key.
  2. The confirmation dialog reads the current credential status and enables Confirm disable only when the status is enabled and its provider revision matches the displayed provider, with no credential operation in progress.
  3. Review the confirmation prompt (Disable API key for {provider name}?) and select Confirm disable, or select Cancel to keep the key active. New runs that use this provider cannot use the disabled key. Runs already assigned this key can continue to use it, and the provider settings stay saved.
  4. If the reply is lost, use Check disable status or Retry disable with the shown operation ID. If the provider or key state changes before the disable finishes, the page refreshes and requires a new confirmation.

Choose the default for new runs ​

Use a provider only after its state is Available and its key status is Key saved. Select Use for new runs.

When the active Available provider has a newer Available revision than the revision saved in platform model settings, the card shows Use latest revision. Select Use latest revision to switch new runs to that revision while keeping unmanaged task defaults and custom overrides unchanged.

Select Use Copilot for new runs to restore hosted Copilot. These controls change the default for fresh runs. Existing accepted runs keep their saved provider selection.

When the page shows the setup prerequisite, initialize platform model settings before changing the default.

Check the result ​

The provider card shows three separate values:

  • Draft or Available
  • Key saved or No key saved
  • Default for new runs

The card also shows the host-request delivery from its provider response:

Delivery statusMeaning
PendingEnvironment delivery is pending.
Received by EnvironmentEnvironment received the request.
FailedEnvironment delivery failed.
Status unavailableThe response has no matching delivery status.

The card shows the returned host and port. It shows Unavailable when either value is invalid. It does not derive the host from the base URL. Receipt by Environment does not approve the host or make the provider ready. To list pending model-provider host requests across tenants from the CLI, run agentweaver platform egress provider-requests list; see the CLI guide. Use agentweaver platform egress provider-requests approve with the listed request values to approve one exact host at the current Policy revision. Select Refresh to read the current provider response.

After a successful switch or conflict, the page reloads the current settings revision and provider revisions.