ERR_INVALID_URL in credentials tester for gemini through litellm proxy server

I’m trying to configure a gemini node connecting through an on-prem litellm proxy server (see LiteLLM Proxy Server (LLM Gateway) | liteLLM)

My credentials seem are ok when I test them, however the n8n credential tester always returns ERR_INVALID_URL

Here are the traces I see in N8N server with debug log level:

n8n-8fd5b7c69-f4wnk 2025-09-26T15:05:06.700Z | debug | Credential test failed {"tags":{},"timestamp":1758899106699,"context":{"itemIndex":0,"runIndex":0},"functionality":"regular","name":"NodeApiError","node":{"id":"temp","parameters":{"temp":""},"name":"Temp-Node","type":"noOp","typeVersion":1,"position":[0,0],"credentials":{"googlePalmApi":{"id":"cJ...","name":"Google Gemini(PaLM) Api account
"}}},"messages":["Invalid URL"],"httpCode":"ERR_INVALID_URL","file":"credentials-tester.service.js","function":"testCredentials"}            
curl -X POST https://llmproxy.my-domain.org/v1/chat/completions   -H "Content-Type: application/json"   -H "Authorization: Bearer sk-.."   -d '{
    "model": "vertex_ai/gemini-2.5-flash-lite",
    "messages": [{"role": "user", "content": "Bonjour, LiteLLM!"}]
  }' | jq .
{
  "id": "6K...",
  "created": 1758898408,
  "model": "gemini-2.5-flash-lite",
  "object": "chat.completion",
  "choices": [
    {
      "finish_reason": "stop",
      "index": 0,
      "message": {
        "content": "Bonjour ! Comment puis-je vous aider aujourd'hui ?",
        "role": "assistant",
        "images": [],
        "thinking_blocks": []
      }
    }
  ],

I’ve set the host field with the FQDN llmproxy.my-domain.org (tested with https:// prefix without more luck).

Any hint to fix this or get a full stack trace and more debugging traces ?

Thanks in advance.

Could you please provide a screenshot of that issue as well, please?

Here is the gemini node screenshot when fetching options


Otherwise, it just hangs in an infinite loop

image

image

until it fails with
``
[GoogleGenerativeAI Error]: Error fetching from ``management.llmproxy.mydomain.org/v1beta/models/gemini-2.5-flash:generateContent:`` Failed to parse URL from ``management.llmproxy.mydomain.org``/v1beta/models/gemini-2.5-flash:generateContent
Unknown error
``

is there a way to get wire traces for a node to diagnose this failed exchange ?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.