Error getting dynamic models OpenAILike : TypeError: fetch failed

Hello, I am getting this error inside bolt whenever I send a message.

There was an error processing your request: No details were returned

bolt logs shows this inside

I am using OpenAIlike endpoint. This endpoint is basically a local connection to GitHub Copilot, which gives access to GPT 4 models and Claude Sonnet. I am not sure what the problem is, any suggestions?

Hi,

changed category to “bolt.diy troubleshooting” :wink:

Can you share a view screenshots of your bolt.diy settings / browser and also give more details what this service is you connect to?

As far as I see your local git service does not provide a model list. Also you should try to request your service without bolt, to make sure it is working (curl against the endpoints)

I tried to inspect Environment Variables Inside the docker container

C:\Users\Bassa>docker exec -it boltdiy-app-dev-1  env
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=8dc2d08221c9
TERM=xterm
RUNNING_IN_DOCKER=true
VITE_HMR_HOST=localhost
VITE_HMR_PORT=5173
GROQ_API_KEY=
VITE_HMR_PROTOCOL=ws
XAI_API_KEY=
ANTHROPIC_API_KEY=
DEFAULT_NUM_CTX=32768
CHOKIDAR_USEPOLLING=true
HuggingFace_API_KEY=
TOGETHER_API_KEY=
WATCHPACK_POLLING=true
VITE_LOG_LEVEL=debug
TOGETHER_API_BASE_URL=
PORT=5173
OPENAI_API_KEY=
GOOGLE_GENERATIVE_AI_API_KEY=
NODE_ENV=development
OLLAMA_API_BASE_URL=
OPEN_ROUTER_API_KEY=
AWS_BEDROCK_CONFIG=
NODE_VERSION=20.18.0
YARN_VERSION=1.22.22
HOME=/root

it does seem that the .env file is not being loaded properly into the container. the variables i use, which is OPENAI_LIKE_API_BASE_URL and OPENAI_LIKE_API_KEY are missing. But this doesn’t make sense, because they are set correctly inside the .env

Also bolt is able successfully connect to my local server and get the models list as u see in the image below. This means my models endpoint is working fine.

My bolt UI settings is empty.

Where could the issue?

Moderators> Can you please allow me to add multiple images? I promise i wont put porn in here LMAO. it says i can only add one embedded media.

You are using localhost instead of 127.0.0.1. I know there was a problem with using localhost.

If this not working, take a look here an try the host.docker.internal

Unfortunately this is not possible at the moment. @ColeMedin is on it to fix some stuff and change regulations. But for now you need to wait I guess 15 hours / beeing a member a bit longer, to post more stuff.

Thanks for the suggestion to use host.docker.internal, it worked perfectly. However, I needed to make additional modifications to the docker-compose.yml file to get everything working as expected:

  1. Issue with .env Changes:
  • I noticed that when making changes to the .env file, the Docker container detects those changes and restarts itself automatically. However, it doesn’t actually apply the updated environment variables unless the project is rebuilt. To resolve this, I manually rebuilt the containers whenever I updated the .env file:
  1. Default docker-compose.yml Configuration:
  • The default docker-compose.yml file was configured to use env_file: ".env.local". Since the repository doesn’t include a .env.local file and only provides a .env file, I updated it to reference .env instead:
  1. Explicit Network Declaration:
  • I added a custom network to better organize the services. This wasn’t strictly necessary, but it helped ensure all containers are on the same network for consistency:
networks:
  default:
    name: bolt-network
    driver: bridge

Environment Variables for Local Server:

  • Lastly, I updated the .env file to include the correct configuration for accessing my local server:
OPENAI_LIKE_API_BASE_URL=http://host.docker.internal:15432

Now it works finally. But since i did not use the app yet, its giving me this terminal error, is this an expected behavior or is there something wrong again with my installation?

Yeah I’ve got a guy on the team now who is a Discourse expert, hoping to get some of these things fixed up soon!

1 Like

=> known issue, not only for docker. I already open a bug issue for this on github

Would be nice if you could open an bug ticket on github for this, so this can be fixed.