Skip to content

fix: fall back to LITELLM_KEY for /models metadata auth#4975

Open
bugkill3r wants to merge 1 commit into
NousResearch:mainfrom
bugkill3r:fix/models-auth-fallback-4913
Open

fix: fall back to LITELLM_KEY for /models metadata auth#4975
bugkill3r wants to merge 1 commit into
NousResearch:mainfrom
bugkill3r:fix/models-auth-fallback-4913

Conversation

@bugkill3r

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • Configure a custom endpoint with auth-required /models route
  • Set LITELLM_KEY in environment
  • Trigger metadata/pricing lookup — should succeed with 200, not 401

…#4913)

fetch_endpoint_model_metadata() sent unauthenticated /models requests
when the caller passed an empty api_key. Fall back to LITELLM_KEY or
OPENAI_API_KEY from the environment so custom endpoints that require
auth on /models get a proper Authorization header.
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard labels May 1, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #4914 — same root cause (fall back to LITELLM_KEY for /models metadata auth). Both fix #4913.

@alt-glitch alt-glitch added the duplicate This issue or pull request already exists label May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard duplicate This issue or pull request already exists P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: custom endpoint metadata lookup can hit /models without auth

2 participants