openclaw - 💡(How to fix) Fix [Bug]: vLLM/SGLang provider wildcards cannot discover from explicit provider endpoints [2 pull requests]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Provider wildcard visibility such as agents.defaults.models: { "vllm/*": {} } or { "sglang/*": {} } cannot discover models from an explicitly configured self-hosted provider endpoint. If models.providers.vllm or models.providers.sglang is present, OpenClaw treats the provider as manual-only and does not query the configured /models endpoint.

Root Cause

Provider wildcard visibility such as agents.defaults.models: { "vllm/*": {} } or { "sglang/*": {} } cannot discover models from an explicitly configured self-hosted provider endpoint. If models.providers.vllm or models.providers.sglang is present, OpenClaw treats the provider as manual-only and does not query the configured /models endpoint.

Fix Action

Fixed

Code Example

{
  models: {
    providers: {
      vllm: {
        baseUrl: "http://vllm-router.example/v1",
        apiKey: "VLLM_API_KEY",
        api: "openai-completions",
        models: []
      }
    }
  },
  agents: {
    defaults: {
      models: {
        "vllm/*": {}
      }
    }
  }
}
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Provider wildcard visibility such as agents.defaults.models: { "vllm/*": {} } or { "sglang/*": {} } cannot discover models from an explicitly configured self-hosted provider endpoint. If models.providers.vllm or models.providers.sglang is present, OpenClaw treats the provider as manual-only and does not query the configured /models endpoint.

Steps to reproduce

  1. Use current main at 096a331ab2.
  2. Configure a self-hosted provider with an explicit endpoint, for example:
{
  models: {
    providers: {
      vllm: {
        baseUrl: "http://vllm-router.example/v1",
        apiKey: "VLLM_API_KEY",
        api: "openai-completions",
        models: []
      }
    }
  },
  agents: {
    defaults: {
      models: {
        "vllm/*": {}
      }
    }
  }
}
  1. Ensure VLLM_API_KEY is set and the endpoint advertises models at /v1/models.
  2. Load the visible model catalog through /models, /model, Gateway model listing, or the shared model catalog path.

Expected behavior

A provider wildcard should keep that provider dynamic: OpenClaw should query the configured provider endpoint's /models response and include all advertised vLLM/SGLang models. Exact model entries such as "vllm/manual-model": {} should remain exact allowlists.

Actual behavior

The shared self-hosted provider discovery helper returns null whenever models.providers.<provider> exists, before invoking the provider catalog builder. That means explicit transport config disables dynamic discovery, even when agents.defaults.models contains "provider/*".

OpenClaw version

main at 096a331ab2 by local source inspection on 2026-05-13. Not verified against a released build.

Operating system

Ubuntu 24.04 local development checkout. Behavior is in shared TypeScript catalog code and should not be OS-specific.

Install method

Local source checkout / pnpm dev workflow.

Model

vllm/* and sglang/* provider wildcard visibility.

Provider / routing chain

OpenClaw -> vLLM or SGLang OpenAI-compatible /v1/models endpoint.

Additional provider/model setup details

This affects common Docker, k8s, router, and remote self-hosted setups where the provider must be configured with a custom baseUrl. The issue is not the vLLM/SGLang server response; it is OpenClaw's discovery policy once explicit provider config exists.

Logs, screenshots, and evidence

Source evidence on main:

  • src/plugins/provider-self-hosted-setup.ts: discoverOpenAICompatibleSelfHostedProvider returns null when params.ctx.config.models?.providers?.[params.providerId] is present.
  • extensions/vllm/index.ts and extensions/sglang/index.ts: both provider catalog hooks use discoverOpenAICompatibleSelfHostedProvider.
  • The shared visible catalog can express provider wildcard visibility through agents.defaults.models, but the self-hosted discovery helper does not currently use that wildcard to decide whether explicit provider transport config may still be used for discovery.

A focused regression test can reproduce the failure by configuring models.providers.vllm.baseUrl plus agents.defaults.models["vllm/*"] and asserting that the provider builder is called with the configured base URL.

Impact and severity

Affected: vLLM and SGLang users with explicit provider endpoint config and provider wildcard visibility. Severity: Medium. It does not crash, but it defeats dynamic model discovery for common self-hosted deployments. Frequency: Always for the explicit-provider-config plus wildcard case. Consequence: Users must manually edit config every time the local server advertises a new model, even though the provider already exposes the model list.

Additional information

This is a follow-up bug in the provider wildcard visibility contract, not a request for Discord component changes. The fix should live in the shared provider catalog/discovery path so text commands, Gateway clients, and Discord stay aligned.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

A provider wildcard should keep that provider dynamic: OpenClaw should query the configured provider endpoint's /models response and include all advertised vLLM/SGLang models. Exact model entries such as "vllm/manual-model": {} should remain exact allowlists.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING