microsoft / microsoft/markitdown
Unrecognized Arguments Error in markitdown CLI for undocumented arguments
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
- Navigate to the
packages/markitdown-ocrdirectory. - Run the following command:
markitdown document.pdf --use-plugins --llm-client openai --llm-model gpt-4o - 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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