microsoft / microsoft/markitdown

Unrecognized Arguments Error in markitdown CLI for undocumented arguments

Open Beginner friendly
#1,897 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
186k
Forks
13.7k
Avg merge
1d 4h
Merged PRs (30d)
49

Description

Unrecognized Arguments Error in markitdown CLI for Undocumented Arguments

Description

The README.md file in packages/markitdown-ocr provides a CLI example:

markitdown document.pdf --use-plugins --llm-client openai --llm-model gpt-4o

However, running this command results in an unrecognized arguments error. This discrepancy occurs because the arguments --use-plugins, --llm-client, and --llm-model are not defined in the CLI parser (__main__.py). The documentation suggests these arguments are supported, but they are not implemented in the codebase.

Steps to Reproduce

  1. Navigate to the packages/markitdown-ocr directory.
  2. Run the following command:
    markitdown document.pdf --use-plugins --llm-client openai --llm-model gpt-4o
    
  3. Observe the error:
    error: unrecognized arguments: --use-plugins --llm-client openai --llm-model gpt-4o
    

Expected Behavior

The CLI should recognize and process the arguments --use-plugins, --llm-client, and --llm-model as documented in the README.md. These arguments should be passed to the MarkItDown constructor to ensure the CLI behaves as described.

Suggested Fix

Update the CLI parser in __main__.py to include the following arguments:

  • --use-plugins: A flag to enable plugin support.
  • --llm-client: A string argument to specify the LLM client (e.g., openai).
  • --llm-model: A string argument to specify the LLM model (e.g., gpt-4o).

These arguments should be passed as keyword arguments to the MarkItDown constructor to ensure compatibility with the documented behavior.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the documented command in packages/markitdown-ocr/README.md with the argument definitions in main.py, then inspect how the MarkItDown constructor receives CLI options. Re-run the documented command from packages/markitdown-ocr; done means all three arguments are accepted and passed through as described without an unrecognized-arguments error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, documentation
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.