iflytek/astron-agent · error · NotImplementedError
SparkDesk-RAG does not support chunks_update operation.
Error message
SparkDesk-RAG does not support chunks_update operation.
What it means
SparkDeskRagStrategy.chunks_update() is an intentional stub raising NotImplementedError. SparkDesk-RAG offers no chunk-level update endpoint, so the adapter cannot fulfill this RagStrategy interface method.
Solutions
- Delete and re-upload the document instead of updating chunks in place
- Gate chunk-update UI/paths off when the backend is SparkDesk-RAG
- Add a chunks_update implementation if SparkDesk exposes a chunk-edit API
Example fix
// before
await strategy.chunks_update(docId, chunkIds, content)
// after
if not isinstance(strategy, SparkDeskRagStrategy):
await strategy.chunks_update(docId, chunkIds, content)
else:
await strategy.delete_document(docId); await upload_document(...) Defensive patterns
Strategy: validation
Validate before calling
if isinstance(strategy, SparkDeskRagStrategy):
raise UnsupportedBackendError("chunk update not available for SparkDesk-RAG") Type guard
def is_sparkdesk(strategy) -> bool:
return isinstance(strategy, SparkDeskRagStrategy) Try / catch
try:
await strategy.chunks_update(docId, chunkIds, payload)
except NotImplementedError:
await rebuild_document_without_chunk(docId, chunkIds) Prevention
- Hide chunk-edit controls when the active RAG backend is SparkDesk
- Prefer whole-document replace workflows for SparkDesk
- Track chunk metadata locally to reduce backend API dependence
When it happens
Trigger: Calling chunks_update(docId, chunkIds, ...) on a SparkDesk-RAG strategy, e.g. editing chunk content or metadata through the generic strategy API.
Common situations: Document-editing features built against other RAG backends and later pointed at SparkDesk-RAG via configuration.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- SparkDesk-RAG does not support split operation.
- SparkDesk-RAG does not support chunks_save operation.
- SparkDesk-RAG does not support chunks_delete operation.
- SparkDesk-RAG does not support query_doc operation.
- SparkDesk-RAG does not support query_doc_name operation.
AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12).
Data as JSON: /api/errors/85a72c413dbd445e.
Report an issue: GitHub.
Appendix: source
Thrown at core/knowledge/service/impl/sparkdesk_strategy.py:120
**kwargs: Any
) -> Any:
"""
Update chunks
Args:
doc_id: Document ID
group: Group name
uid: User ID
chunks: Chunk list
**kwargs: Other parameters
Returns:
Update result
Raises:
NotImplementedError: SparkDesk-RAG does not support update operation
"""
raise NotImplementedError(
"SparkDesk-RAG does not support chunks_update operation."
)
async def chunks_delete(
self, docId: str, chunkIds: List[str], **kwargs: Any
) -> Any:
"""
Delete chunks
Args:
doc_id: Document ID
chunk_ids: Chunk ID list
**kwargs: Other parameters
Returns:
Delete result
Raises:View on GitHub (pinned to 5e758547a8)