Skip to content

Conversation

@lemisky
Copy link

@lemisky lemisky commented Nov 18, 2025

PR Message

This PR adds support for two environment variables to improve MinerU’s compatibility when deployed on model management platforms such as GPUStack.

Background

We are from the GPUStack team. While integrating MinerU into model management platforms, we encountered the following issues:

  1. Unable to specify model_name when multiple models are present
    When MinerU calls /v1/models, it raises an error if the backend returns more than one model, as shown in the current implementation.
    The CLI does not provide a way to specify the model name.
    The new MINERU_VL_MODEL_NAME environment variable addresses this limitation.

  2. Lack of API key support for authenticated platforms
    Many model management platforms use OpenAI-compatible API keys for authentication, but MinerU currently does not support providing an API key.
    The new MINERU_VL_API_KEY environment variable enables MinerU to work in authentication-required environments.

Changes

  • Added support for MINERU_VL_MODEL_NAME to explicitly specify the model name.
  • Added support for MINERU_VL_API_KEY to allow MinerU to pass an API key when authentication is needed.

These enhancements make MinerU more flexible and better suited for deployment behind AI gateways and model management platforms that handle multiple models or require authentication.

@lemisky lemisky force-pushed the feat/cli-env-model-and-api-key branch from 50a0352 to 2965b36 Compare November 19, 2025 03:13
@lemisky
Copy link
Author

lemisky commented Nov 20, 2025

@myhloli , could you please take a look at this PR when you have time? Thanks!

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