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 Segment API (embedded mode) does not support attached function operations.
What it means
Chroma's attached-functions feature (server-side functions that derive an output collection from an input collection) exists only on a Chroma server reached via HttpClient. The embedded SegmentAPI overrides attach_function to raise NotImplementedError with a message explicitly redirecting to HttpClient — there is no function engine in embedded mode.
Source
Thrown at chromadb/api/segment.py:1073
return self._settings
@override
def get_max_batch_size(self) -> int:
return self._producer.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 Segment API (local embedded mode)."""
raise NotImplementedError(
"Attached functions are only supported when connecting to a Chroma server via HttpClient. "
"The Segment API (embedded mode) does 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 Segment API (local embedded mode)."""
raise NotImplementedError(
"Attached functions are only supported when connecting to a Chroma server via HttpClient. "
"The Segment API (embedded mode) does not support attached function operations."
)
View on GitHub (pinned to aecdd12c8a)
Solutions
- Run a Chroma server and connect with chromadb.HttpClient, then attach functions there
- Feature-detect: wrap attach_function in try/except NotImplementedError and disable the functions path when embedded
- Branch on settings.chroma_api_impl before touching the function APIs
Example fix
// before
coll.attach_function(function_id='builtin:chunking', name='chunks', ...) # NotImplementedError
// after
client = chromadb.HttpClient(host='localhost', port=8000)
coll = client.get_collection('docs')
coll.attach_function(function_id='builtin:chunking', name='chunks', ...) Defensive patterns
Strategy: validation
Validate before calling
import chromadb
def is_server_client(client: chromadb.ClientAPI) -> bool:
return 'http' in (client.get_settings().chroma_api_impl or '').lower()
def attach_function_safe(coll, **kwargs):
if not is_server_client(coll._client):
raise NotImplementedError('attached functions require a Chroma server')
return coll.attach_function(**kwargs) Try / catch
try:
attached = coll.attach_function(function_id=fn_id, name=name,
input_collection_id=coll.id,
output_collection=out_name)
except NotImplementedError:
attached = None # embedded mode: functions unsupported Prevention
- Gate all attached-function calls behind an is-server check
- Start function development against a Docker Chroma server from the beginning
- Keep a feature matrix of embedded vs server capabilities in your project docs
When it happens
Trigger: collection.attach_function(function_id=..., name=..., input_collection_id=..., output_collection=..., params=...) on an embedded client (chromadb.Client, EphemeralClient, PersistentClient).
Common situations: Prototyping the attached-functions feature locally in a notebook with PersistentClient; running server-oriented integration tests against an embedded client; SDK/wrapper code that manages attached functions regardless of backend.
Related errors
- Attached functions are only supported when connecting to a C
- Indexing status is not implemented for SegmentAPI
- Search is not implemented for SegmentAPI
- Conditional transactions are not supported by SegmentAPI
- Conditional transactions are only supported when connecting
AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16).
Data as JSON: /api/errors/d9982a87ffe0b6ca.
Report an issue: GitHub.