Skip to content

Allow vlmrun gw commands without an API key - #220

Merged
nwaughachukwuma merged 5 commits into
mainfrom
cursor/gw-no-api-key-029e
Sep 4, 2026
Merged

Allow vlmrun gw commands without an API key#220
nwaughachukwuma merged 5 commits into
mainfrom
cursor/gw-no-api-key-029e

Conversation

@spillai

@spillai spillai commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Gateway CLI subcommands (vlmrun gw / vlmrun gateway) no longer require VLMRUN_API_KEY or a configured API key. Other subcommands (chat, files, generate, etc.) continue to enforce credentials as before.

This enables usage like:

uvx vlmrun gw chat https://vlm.run/example.pdf -m zai-org/glm-ocr

without ever setting an API key.

Bumps version to 0.9.0.

Changes

  • Skip CLI credential checks for gw / gateway subcommands
  • Add require_api_key: bool = True to VLMRun; gateway-only initialization sets it to False
  • When no API key is present, the gateway client uses an empty OpenAI api_key and omits the Authorization header on health checks
  • Update gateway CLI help text to reflect that an API key is optional
  • Bump vlmrun.version.__version__ from 0.8.2 to 0.9.0
  • Add tests covering gateway-without-key behavior and ensuring non-gateway commands still require a key

Test plan

  • pytest tests/test_client.py::test_client_without_api_key_when_not_required
  • pytest tests/test_gateway.py::TestGatewayCLI::test_gw_skips_api_key_check
  • pytest tests/test_gateway.py::TestGatewayCLI::test_non_gw_still_requires_api_key
  • pytest tests/test_gateway.py::TestGatewayResource::test_health_omits_auth_header_without_api_key
  • Manual: unset VLMRUN_API_KEY && vlmrun gw models succeeds
  • Manual: unset VLMRUN_API_KEY && vlmrun files list still fails with API key required
Open in Web Open in Cursor 

Gateway CLI subcommands (gw/gateway) no longer require VLMRUN_API_KEY or a
configured key. Other subcommands still enforce credentials as before.

- Add require_api_key=False path on VLMRun for gateway-only initialization
- Skip CLI credential check for gw/gateway subcommands
- Omit Authorization header and use empty OpenAI api_key when unset

Co-authored-by: sudeep <sudeep@vlm.run>
Co-authored-by: sudeep <sudeep@vlm.run>
Co-authored-by: sudeep <sudeep@vlm.run>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Devin Review: 1 flag

Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

Co-authored-by: sudeep <sudeep@vlm.run>
Co-authored-by: sudeep <sudeep@vlm.run>
@nwaughachukwuma
nwaughachukwuma merged commit fee4963 into main Sep 4, 2026
4 checks passed
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.

3 participants