coleam00 / bolt.new-any-llm

Prompt, run, edit, and deploy full-stack web applications using any LLM you want!
https://bolt.new
MIT License
1.97k stars 896 forks source link

liteLLM issue #189

Open nushret opened 10 hours ago

nushret commented 10 hours ago

Describe the bug

liteLLM is installed on my windows local machine. and I can access it with the link http://localhost:4000.

I added this to the .env file as below.

OPENAI_LIKE_API_BASE_URL=http://localhost:4000

I see the model in the OpenAILike section of the models, but when I type prompt. I get the following error.

Messages: [ [Object] ], vehicles: undefined, tool_choice: undefined, flow: right }, statusCode: 401, responseHeaders: { 'cf-cache-status': 'DYNAMIC', 'cf-ray': '8de466b78e69ca29-OTP', connection: 'keep-alive', 'content-length': '97', 'content-type': 'application/json', date: 'Wed, 06 Nov 2024 10:29:13 GMT', 'request-id': 'req_017a4hYd66XdNsKbTKkkcRAjx', server: “cloudflare”, via: '1.1 google', 'x-robots-tag': 'none', 'x-should-retry': 'false' }, responseBody: '{“type”: “error“, ‘error’:{”type": “authentication_error”, ‘message’: “x-api-key header is required"}}', isRetryable: false, Data: { type: 'error', Error: { tip: 'authentication_error', message: 'x-api-key header required' } },

}

Link to the Bolt URL that caused the error

http://localhost:5173/

Steps to reproduce

iteLLM is installed on my windows local machine. and I can access it with the link http://localhost:4000.

I added this to the .env file as below.

OPENAI_LIKE_API_BASE_URL=http://localhost:4000

I see the model in the OpenAILike section of the models, but when I type prompt. I get the following error.

Expected behavior

How do I connect to openAILike url without auth?

Screen Recording / Screenshot

No response

Platform

Additional context

No response

nandan121 commented 6 hours ago

I think if you set the KEY it should work, the KEY should not be blank. I could get it working. Be careful to use a model name that is unique else use TommyHolmberg:respect-provider-choice

#testing Litellm
OPENAI_LIKE_API_BASE_URL=http://0.0.0.0:4000
# Get your OpenAI Like API Key
OPENAI_LIKE_API_KEY=doesnotmatter