Toggles a Large Language Model (LLM) provider active status
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, typically granted tosuper adminroles. - Provider ID: The ID of an existing LLM Provider. You can retrieve it from the
llmProvidersByOrganizationquery.
Step 1: Execute the Mutation
This mutation enables or disables an existing LLM provider.
Activating a provider
mutation {
setLlmProviderActiveStatus(
input: {
providerId: "27"
active: true
}
) {
success
}
}
Deactivating a provider
mutation {
setLlmProviderActiveStatus(
input: {
providerId: "27"
active: false
}
) {
success
}
}
Arguments
providerId(ID, required): The ID of the LLM provider whose status you want to change.active(Boolean, required): Passtrueto activate the provider orfalseto deactivate it.
Response Fields
success(Boolean): Returnstruewhen the active status was updated successfully,falseotherwise.
Example Response
{
"data": {
"setLlmProviderActiveStatus": {
"success": true
}
}
}
Additional Notes
- If the
providerIdis invalid or does not belong to the current organization, an error will be returned. - If the mutation fails due to insufficient permissions, an authorization error will be raised.
- Deactivating a provider does not delete it; it can be re-activated at any time by calling this mutation with
active: true.
This mutation provides a quick way to enable or disable an LLM provider without deleting its configuration.
