Retrieve the currently active Large Language Model (LLM) provider for a specific assistant or for the organization.
Before You Begin
🔗 Use the GraphQL Playground to execute the queries 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 whose active provider you want to check.
Step 1: Execute the Query
This query retrieves the configuration details of the LLM provider that is currently set as active for a specific owner.
query {
activeLlmProvider(
ownerType: assistant
ownerId: "asst_123abc"
) {
id
llmProviderId
ownerId
ownerType
}
}
Arguments
ownerType(Enum, required): The type of owner. Must beassistantororganization.ownerId(String, required): The ID of the target assistant or organization.
Response Fields
activeLlmProvider: The active provider link object, containing:id: Unique ID of the active provider setting.llmProviderId: The ID of the active LLM provider configuration.ownerId: The ID of the assistant or organization.ownerType: The type of owner (assistantororganization).
Example Response
{
"data": {
"activeLlmProvider": {
"id": "15",
"llmProviderId": "27",
"ownerId": "asst_123abc",
"ownerType": "ASSISTANT"
}
}
}
Additional Notes
- If no provider is set as active for the specified owner, the query will return
null. - This query is useful for verifying which provider is currently in use before attempting to change it or perform other actions.
- An error will be returned if the
ownerIdis invalid or if you lack the necessary permissions.
This query allows you to easily check the currently active LLM provider for any given assistant or for the organization itself.
