chroma-core/chroma · error · NotImplementedError

Attached functions are only supported when connecting to a C

Error message

Attached functions are only supported when connecting to a Chroma server via HttpClient. The Rust bindings (embedded mode) do not support attached function operations.

What it means

RustBindingsAPI.attach_function (chromadb/api/rust.py:759) is a stub: attached functions (server-side functions that run over an input collection and write to an output collection) exist only in Chroma's server product. The embedded Rust bindings raise NotImplementedError for the entire attached-function surface.

Source

Thrown at chromadb/api/rust.py:759

        return self._system.settings

    @override
    def get_max_batch_size(self) -> int:
        return self.bindings.get_max_batch_size()

    @override
    def attach_function(
        self,
        function_id: str,
        name: str,
        input_collection_id: UUID,
        output_collection: str,
        params: Optional[Dict[str, Any]] = None,
        tenant: str = DEFAULT_TENANT,
        database: str = DEFAULT_DATABASE,
    ) -> Tuple["AttachedFunction", bool]:
        """Attached functions are not supported in the Rust bindings (local embedded mode)."""
        raise NotImplementedError(
            "Attached functions are only supported when connecting to a Chroma server via HttpClient. "
            "The Rust bindings (embedded mode) do not support attached function operations."
        )

    @override
    def get_attached_function(
        self,
        name: str,
        input_collection_id: UUID,
        tenant: str = DEFAULT_TENANT,
        database: str = DEFAULT_DATABASE,
    ) -> "AttachedFunction":
        """Attached functions are not supported in the Rust bindings (local embedded mode)."""
        raise NotImplementedError(
            "Attached functions are only supported when connecting to a Chroma server via HttpClient. "
            "The Rust bindings (embedded mode) do not support attached function operations."
        )

View on GitHub (pinned to aecdd12c8a)

Solutions

  1. Connect with chromadb.HttpClient to a Chroma server that supports attached functions
  2. Reproduce the function logic client-side: read the input collection, compute, and write results into the output collection yourself
  3. Skip the attach step when running embedded, behind a capability check

Example fix

# before (raises NotImplementedError on Rust bindings)
client.attach_function(function_id='fn_id', name='enrich', input_collection_id=col.id, output_collection='enriched')

# after - server client
client = chromadb.HttpClient(host='localhost', port=8000)
client.attach_function(function_id='fn_id', name='enrich', input_collection_id=col.id, output_collection='enriched')
Defensive patterns

Strategy: try-catch

Validate before calling

def supports_attached_functions(client) -> bool:
    return type(client._server).__module__.startswith('chromadb.api.fastapi')

Try / catch

try:
    client.attach_function(function_id=fid, name='enrich',
                           input_collection_id=col.id, output_collection='enriched')
except NotImplementedError:
    # embedded mode: run the function logic client-side instead
    pass

Prevention

When it happens

Trigger: client.attach_function(function_id=..., name='my_fn', input_collection_id=..., output_collection='fn_out') executed on a chromadb.RustClient / RustBindingsAPI-backed client.

Common situations: Deploying a pipeline that uses attached functions (e.g. embedding or enrichment functions) into a local/embedded test environment; demo notebooks written for Chroma server run against an embedded client.

Related errors


AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16). Data as JSON: /api/errors/5439bca235459920. Report an issue: GitHub.