Skip to content

fix(cli): allow Content Understanding conversion from stdin - #2318

Open
Tyyyy (uczltw6) wants to merge 1 commit into
microsoft:mainfrom
uczltw6:codex/fix-cu-stdin
Open

fix(cli): allow Content Understanding conversion from stdin#2318
Tyyyy (uczltw6) wants to merge 1 commit into
microsoft:mainfrom
uczltw6:codex/fix-cu-stdin

Conversation

@uczltw6

Copy link
Copy Markdown

Summary

  • preserve the CLI's filename-optional stdin mode when --use-cu is enabled
  • let piped input use the existing convert_stream() dispatch path
  • add a regression test for Content Understanding stdin routing

Problem

The CLI documents piping input without a filename, but the --use-cu branch exits before reaching the shared stdin path. Content Understanding analyzes binary input and does not require a local file path, so this guard unnecessarily prevents cat report.pdf | markitdown --use-cu --cu-endpoint ....

The endpoint validation remains unchanged, and filename-based conversion is unaffected.

Tests

  • hatch test tests/test_cu_converter.py tests/test_cli_misc.py -q — 127 passed
  • hatch test -q — 337 passed, 4 skipped
  • Black 23.7.0 on both changed files — passed

OpenAI Codex assisted with identifying the inconsistent CLI branch and preparing the focused regression test; the behavior and test results were verified locally.

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.

2 participants