Retrieve the currently active Large Language Model (LLM) provider for a specific assistant or for the organization.
Deprecation
The GraphQL field activeLlmProvider is deprecated. Do not rely on it for new integrations; it may be removed in a future API version. Use the defaultLlmProvider query instead. See the Default LLM Provider Query guide for the recommended field, arguments, and response shape.
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. Listed under OwnerProvider in the GraphQL Playground.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 owner entity (e.g., an assistant's ID).ownerType: The type of owner (assistantororganization).
Example Response
{
"data": {
"activeLlmProvider": {
"id": "15",
"llmProviderId": "27",
"ownerId": "asst_123abc",
"ownerType": "ASSISTANT"
}
}
}
Additional Notes
- Deprecation: Prefer
defaultLlmProvideroveractiveLlmProvider; see Default LLM Provider Query. - 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.
Deprecated: For the supported replacement, use Default LLM Provider Query (
defaultLlmProvider).
