Skip to content

fix: add CLI LLM options#1908

Open
he-yufeng wants to merge 1 commit into
microsoft:mainfrom
he-yufeng:fix/cli-llm-options
Open

fix: add CLI LLM options#1908
he-yufeng wants to merge 1 commit into
microsoft:mainfrom
he-yufeng:fix/cli-llm-options

Conversation

@he-yufeng

Copy link
Copy Markdown

Summary

  • add CLI support for --llm-client openai, --llm-model, and --llm-prompt
  • pass LLM options through to MarkItDown(...) so plugin converters can use the documented OCR workflow
  • use sys.executable in CLI subprocess tests so they run under the active test interpreter on Windows

To verify

  • .venv\Scripts\python.exe -m pytest packages\markitdown\tests\test_cli_misc.py -q
  • .venv\Scripts\python.exe -m mypy --ignore-missing-imports packages\markitdown\src\markitdown\__main__.py packages\markitdown\tests\test_cli_misc.py
  • .venv\Scripts\python.exe -m py_compile packages\markitdown\src\markitdown\__main__.py packages\markitdown\tests\test_cli_misc.py
  • git diff --check -- packages/markitdown/src/markitdown/__main__.py packages/markitdown/tests/test_cli_misc.py

Fixes #1897

@he-yufeng he-yufeng force-pushed the fix/cli-llm-options branch from 4688d0c to fefd062 Compare June 12, 2026 00:39
@he-yufeng

Copy link
Copy Markdown
Author

Rebased onto current main; no conflicts.

Focused validation after the rebase:

python -m py_compile packages\markitdown\src\markitdown\__main__.py packages\markitdown\tests\test_cli_misc.py
$env:PYTHONPATH='C:\dev\GITHUB-clean\markitdown-1908\packages\markitdown\src'; python -m pytest packages\markitdown\tests\test_cli_misc.py -q
git diff --check origin/main..HEAD

Result: 4 passed for the CLI misc tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant