← Về thư mục
📄 / / profiles / r-and-d / raw_evidence / scientific-agent-skills / skills / markitdown / references / migration.md

Migration and Release Notes

This skill targets MarkItDown 0.1.6. The timeline below summarizes changes that affect user code and operational guidance.

Release Timeline

0.1.0 — March 22, 2025

Major architecture release:

Breaking changes:

0.1.1 — March 25, 2025

0.1.2 — May 28, 2025

0.1.3 — August 26, 2025

0.1.4 — December 1, 2025

Security maintenance release:

0.1.5 — February 20, 2026

0.1.6 — May 26, 2026

Upgrade Installation

Create a clean environment for the comparison:

uv venv --python 3.12 .venv-markitdown
source .venv-markitdown/bin/activate
uv pip install "markitdown[all]==0.1.6"

Do not test a migration in an environment that still contains unknown third-party plugins.

Code Replacements

Result content

Old/compatibility:

content = result.text_content

Current:

content = result.markdown

text_content still works in 0.1.6 but is explicitly documented in source as a soft-deprecated alias.

Local conversion

Broad:

result = converter.convert(user_value)

Narrow local path:

result = converter.convert_local(validated_path)

Use convert_stream() for validated uploaded bytes and convert_response() after an application-controlled download.

Streams

Old:

from io import StringIO

result = converter.convert_stream(StringIO("text"))

Current:

from io import BytesIO

from markitdown import StreamInfo

result = converter.convert_stream(
    BytesIO(b"text"),
    stream_info=StreamInfo(
        extension=".txt",
        mimetype="text/plain",
        charset="utf-8",
    ),
)

URI API

Old:

result = converter.convert_url(uri)

Current:

result = converter.convert_uri(validated_uri)

Prefer caller-controlled fetching plus convert_response() for HTTP(S).

Hints

Legacy:

result = converter.convert_stream(stream, file_extension=".pdf")

Current:

from markitdown import StreamInfo

result = converter.convert_stream(
    stream,
    stream_info=StreamInfo(
        extension=".pdf",
        mimetype="application/pdf",
        filename="upload.pdf",
    ),
)

The legacy file_extension/url parameters still exist but are marked for migration in source.

Custom Converter Migration

Pre-0.1 converter:

class OldConverter(DocumentConverter):
    def convert(self, file_path):
        ...

0.1.x converter:

from typing import Any, BinaryIO

from markitdown import DocumentConverter, DocumentConverterResult, StreamInfo


class CurrentConverter(DocumentConverter):
    def accepts(
        self,
        file_stream: BinaryIO,
        stream_info: StreamInfo,
        **kwargs: Any,
    ) -> bool:
        ...

    def convert(
        self,
        file_stream: BinaryIO,
        stream_info: StreamInfo,
        **kwargs: Any,
    ) -> DocumentConverterResult:
        return DocumentConverterResult(markdown="...")

If accepts() peeks at bytes, restore the original stream position before returning.

Plugin Packaging Migration

Outdated entry-point group:

[project.entry-points."markitdown.plugins"]

Current group:

[project.entry-points."markitdown.plugin"]
example = "example_markitdown_plugin"

The plugin module must export:

__plugin_interface_version__ = 1


def register_converters(markitdown, **kwargs):
    ...

Use pyproject.toml; old setup.py-only examples are no longer the preferred packaging pattern.

Installation Guidance Migration

Outdated:

uv pip install markitdown
uv pip install "markitdown[all]"

Repository-standard reproducible install:

uv pip install "markitdown[all]==0.1.6"

The base package no longer implies every format dependency. Select an extra or [all].

OCR Guidance Migration

Remove these stale claims:

Current behavior:

The official OCR plugin README's --llm-client/--llm-model CLI example is not accepted by the 0.1.6 core CLI parser. Configure the plugin in Python.

Azure Migration

Current constructors accept explicit credentials:

MarkItDown(
    docintel_endpoint="https://...",
    docintel_credential=credential,
)

MarkItDown(
    cu_endpoint="https://...",
    cu_credential=credential,
)

Without an explicit credential, the 0.1.6 converters use the named AZURE_API_KEY if present and otherwise DefaultAzureCredential.

Do not rely on undocumented variable names such as AZURE_DOCUMENT_INTELLIGENCE_KEY for these constructors.

Content Understanding is new in 0.1.6:

from markitdown import MarkItDown

converter = MarkItDown(
    cu_endpoint="https://...",
    cu_analyzer_id="optional-custom-analyzer",
)

Security Migration

Replace:

With:

Regression Checklist

Sources