Skip to content
Back to feed

November 3, 2026 · TwelveLabs

Knowledge store items can be sorted by custom metadata key, sort_by type now a string

You can now sort the items in a knowledge store by the value of a custom metadata key when you list them. Set the sort_by parameter to metadata.<key>. For example, metadata.view_count sorts the items by the view_count key.

To use this feature, upgrade to the latest version of the Python or Node.js SDK:

Python SDK

pip install --upgrade twelvelabs

Node.js SDK

npm install twelvelabs-js@latest

SDK type changes (breaking change)

The sort_by parameter in Python and the sortBy parameter in Node.js are now strings. The SDKs no longer include the KnowledgeStoreItemsListRequestSortBy type. If your code uses this type, pass the value as a string instead, for example "created_at".

For details, see the List knowledge store items page in the API Reference section, or the SDK reference for Python and Node.js.

Latest TwelveLabs API changes

All TwelveLabs API changes