Skip to content

Utils

Shared utilities for LM invoker operation classes.

SupportedMethodsMixin

Mixin that provides a read-only supported_methods property.

Subclasses declare their supported method names via the class-level _supported_methods attribute. Each concrete class must explicitly set its own complete set — there is no implicit inheritance merging.

Examples:

class MyOps(SupportedMethodsMixin):
    _supported_methods: ClassVar[frozenset[str]] = frozenset({"create", "list"})

"create" in MyOps(any_invoker).supported_methods  # True

supported_methods property

Return the set of method names supported by this operation namespace.

Returns:

Type Description
frozenset[str]

frozenset[str]: The supported method names. The returned set is read-only — membership checks are the primary use case.