Skip to content

Python tool for converting files and office documents to Markdown.

Fixed deepcopy failure when passing llm_client (#1089)

scalabreseGD36c4bc9ec321
diff --git a/packages/markitdown/src/markitdown/_markitdown.py b/packages/markitdown/src/markitdown/_markitdown.py
index d88bb73c..fd2b85f7 100644
--- a/packages/markitdown/src/markitdown/_markitdown.py
+++ b/packages/markitdown/src/markitdown/_markitdown.py
@@ -455,7 +455,7 @@ class MarkItDown:
cur_pos == file_stream.tell()
), f"File stream position should NOT change between guess iterations"
- _kwargs = copy.deepcopy(kwargs)
+ _kwargs = {k:v for k,v in kwargs.items()}
# Copy any additional global options
if "llm_client" not in _kwargs and self._llm_client is not None: