Skip to content

fix: report configured vendor initialization failures - #2321

Merged
ksylvan merged 6 commits into
danielmiessler:mainfrom
wozhenbang2004:fix/vendor-configuration-warnings
Nov 1, 2026
Merged

ksylvan merged 6 commits into
danielmiessler:mainfrom
wozhenbang2004:fix/vendor-configuration-warnings

Conversation

@wozhenbang2004

@wozhenbang2004 wozhenbang2004 commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

What this Pull Request (PR) does

When a configured vendor fails initialization, show its name and the configuration error on stderr even when debug logging is off. Missing credentials for unused vendors remain quiet. For example, a LiteLLM http://10.1.2.3:4000/v1 endpoint rejected by the existing URL policy now explains why the vendor was skipped. The HTTPS and explicit LAN opt-in rules are unchanged.

A regression test uses the real LiteLLM client for a rejected configured endpoint, an unconfigured provider, and a valid HTTPS endpoint. The first case fails on the unchanged source; all three pass with the fix. It also checks that the API key is absent from the diagnostic.

Validation with Go 1.26.10:

  • go test -count=1 ./... passed.
  • go test -race -count=1 ./internal/core ./internal/plugins/... passed.
  • go test -race -count=1 ./internal/server/... passed.
  • go vet ./..., the CI modernization analyzer, gofmt, and git diff --check passed.
  • Nix is unavailable locally, so nix flake check was not run. No live provider calls were made.

Generated and included cmd/generate_changelog/incoming/2321.txt with go run ./cmd/generate_changelog --incoming-pr 2321 --push=false.

After localizing the unconfigured-vendor debug message, fork CI passes for 8fece94: full tests, race tests, the modernization analyzer, nix flake check, and the Windows domain tests. Upstream GitHub Actions still awaits maintainer approval.

AI assistance: OpenAI Codex assisted with investigation, implementation, and local validation.

Related issues

Fixes #2311.

Screenshots

Not applicable; the change is a stderr diagnostic.

@ksylvan ksylvan left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for this fix. One minor change needed.

Comment thread internal/core/plugin_registry.go Resolved
- Extract vendor configuration warning formatting into one shared variable.
- Reuse captured test output across warning content assertions.

@ksylvan ksylvan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you. LGTM. Made a minor refactoring fix.

@ksylvan
ksylvan merged commit 40c05dc into danielmiessler:main Nov 1, 2026
2 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.

[Bug]: LiteLLM fails silently on http remote

2 participants