{"record":{"id":"5439bca235459920","repo":"chroma-core/chroma","slug":"attached-functions-are-only-supported-when-connect","errorCode":null,"errorMessage":"Attached functions are only supported when connecting to a Chroma server via HttpClient. The Rust bindings (embedded mode) do not support attached function operations.","messagePattern":"Attached functions are only supported when connecting to a Chroma server via HttpClient\\. The Rust bindings \\(embedded mode\\) do not support attached function operations\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"chromadb/api/rust.py","lineNumber":759,"sourceCode":"        return self._system.settings\n\n    @override\n    def get_max_batch_size(self) -> int:\n        return self.bindings.get_max_batch_size()\n\n    @override\n    def attach_function(\n        self,\n        function_id: str,\n        name: str,\n        input_collection_id: UUID,\n        output_collection: str,\n        params: Optional[Dict[str, Any]] = None,\n        tenant: str = DEFAULT_TENANT,\n        database: str = DEFAULT_DATABASE,\n    ) -> Tuple[\"AttachedFunction\", bool]:\n        \"\"\"Attached functions are not supported in the Rust bindings (local embedded mode).\"\"\"\n        raise NotImplementedError(\n            \"Attached functions are only supported when connecting to a Chroma server via HttpClient. \"\n            \"The Rust bindings (embedded mode) do not support attached function operations.\"\n        )\n\n    @override\n    def get_attached_function(\n        self,\n        name: str,\n        input_collection_id: UUID,\n        tenant: str = DEFAULT_TENANT,\n        database: str = DEFAULT_DATABASE,\n    ) -> \"AttachedFunction\":\n        \"\"\"Attached functions are not supported in the Rust bindings (local embedded mode).\"\"\"\n        raise NotImplementedError(\n            \"Attached functions are only supported when connecting to a Chroma server via HttpClient. \"\n            \"The Rust bindings (embedded mode) do not support attached function operations.\"\n        )\n","sourceCodeStart":741,"sourceCodeEnd":777,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/chromadb/api/rust.py#L741-L777","documentation":"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.","triggerScenarios":"client.attach_function(function_id=..., name='my_fn', input_collection_id=..., output_collection='fn_out') executed on a chromadb.RustClient / RustBindingsAPI-backed client.","commonSituations":"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.","solutions":["Connect with chromadb.HttpClient to a Chroma server that supports attached functions","Reproduce the function logic client-side: read the input collection, compute, and write results into the output collection yourself","Skip the attach step when running embedded, behind a capability check"],"exampleFix":"# before (raises NotImplementedError on Rust bindings)\nclient.attach_function(function_id='fn_id', name='enrich', input_collection_id=col.id, output_collection='enriched')\n\n# after - server client\nclient = chromadb.HttpClient(host='localhost', port=8000)\nclient.attach_function(function_id='fn_id', name='enrich', input_collection_id=col.id, output_collection='enriched')","handlingStrategy":"try-catch","validationCode":"def supports_attached_functions(client) -> bool:\n    return type(client._server).__module__.startswith('chromadb.api.fastapi')","typeGuard":null,"tryCatchPattern":"try:\n    client.attach_function(function_id=fid, name='enrich',\n                           input_collection_id=col.id, output_collection='enriched')\nexcept NotImplementedError:\n    # embedded mode: run the function logic client-side instead\n    pass","preventionTips":["Provision attached functions only in server deployments","Keep a client-side reimplementation of each function for embedded/testing parity","Check the backend type once during app bootstrap rather than at every attach call"],"tags":["chroma","embedded-mode","rust-bindings","attached-functions","not-implemented"],"backgroundTag":"feature-unsupported-in-embedded-mode","analyzedSha":"aecdd12c8a891610db8653630b066b32ceb678b5","analyzedAt":"2026-08-16T21:53:27.228Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}