Define which LLM provider configuration is active for a given assistant or for the entire organization.
Before You Begin
🔗 Use the GraphQL Playground to execute the mutations in this guide.
➡️ New to GraphQL? Learn how to navigate the Playground with our Playground Basics Guide.
Prerequisites
-
Authentication: Use a Service Account token.
-
Permissions: You must have permissions to
manage AI providersin the organization. -
Owner ID & Type: The ID and type (
assistantororganization) of the entity for which you are setting the provider. -
Provider ID: The ID of the provider to set as active. You can either activate:
- A custom (BYOM) provider — pass its ID as
providerId(get it from the llmProvidersByOrganization query); or - A system (Pipefy-managed) provider — pass its ID as
systemProviderId(get it from the allLlmProvidersByOrganization query).
You must provide exactly one of
providerIdorsystemProviderId. - A custom (BYOM) provider — pass its ID as
Step 1: Execute the Mutation
This mutation assigns an existing LLM provider as the active one for a specific owner (either an assistant or the entire organization).
Activating a custom (BYOM) provider
mutation {
setActiveLlmProvider(input: { providerId: "27", ownerType: assistant, ownerId: "asst_123abc" }) {
activeLlmProvider {
id
llmProviderId
systemLlmProviderId
ownerId
ownerType
}
}
}
Activating a system provider
mutation {
setActiveLlmProvider(input: { systemProviderId: "99", ownerType: assistant, ownerId: "asst_123abc" }) {
activeLlmProvider {
id
llmProviderId
systemLlmProviderId
ownerId
ownerType
}
}
}
Arguments
providerId(ID, optional): The ID of the custom (BYOM) LLM provider to activate.systemProviderId(ID, optional): The ID of the system (Pipefy-managed) LLM provider to activate.ownerType(Enum, required): The type of owner. Listed under OwnerProvider in the GraphQL Playground.ownerId(String, required): The ID of the owner entity (e.g., an assistant's ID).
Note:
providerIdandsystemProviderIdare individually optional, but exactly one of them must be provided. Sending neither (or both) results in an error.
Response Fields
activeLlmProvider: The newly activated provider link, containing:id: Unique ID of the active provider setting.llmProviderId: The ID of the activated custom (BYOM) provider.nullwhen a system provider is active.systemLlmProviderId: The ID of the activated system provider.nullwhen a custom provider is active.ownerId: The ID of the owner entity (e.g., an assistant's ID).ownerType: The type of owner. Listed under OwnerProvider in the GraphQL Playground.
Example Response
{
"data": {
"setActiveLlmProvider": {
"activeLlmProvider": {
"id": "15",
"llmProviderId": null,
"systemLlmProviderId": "99",
"ownerId": "asst_123abc",
"ownerType": "assistant"
}
}
}
}
Additional Notes
- If the specified configuration is invalid or the mutation fails, an error will be raised with a detailed message.
- This mutation is useful for programmatically switching between different LLM providers in a multi-provider setup.
- The visibility of this mutation may depend on feature flags being enabled for your organization.
This mutation provides a quick and reliable way to set the active LLM provider for a specific assistant or an entire organization.

