DNS resolution issue with Azure OpenAI provider when running in WSL
Open 💬 3 comments Opened Nov 19, 2025 by illgitthat
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
0.60.1
What subscription do you have?
Azure OpenAI
Which model were you using?
gpt-5.1-codex
What platform is your computer?
Ubuntu via WSL
What issue are you seeing?
Connection failed: error sending request for url (https://{{{endpoint}}}}.openai.azure.com/openai/responses?api-
version=2025-04-01-preview)
What steps can reproduce the bug?
Platform: WSL on Windows Issue #1552 details a number of general issues related to the Azure OpenAI service provider. I'm opening this issue to focus specifically on a DNS resolution problem that appears to be affecting many users.
What is the expected behavior?
The connection should work.
Additional information
@doggy8088 has done some great analysis and has provided details here in the thread. For convenience, I'm pasting the workaround suggested in the other thread.
# Workaround To work around the issue, you can add a statically mapped DNS record to the /etc/hosts file. `` # This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf: # [network] # generateHosts = false 127.0.0.1 localhost <feff> 127.0.0.1 localhost # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters # Add this line below. Make sure the IP is correct. 20.232.91.180 test.openai.azure.com ``
Note: This has been previously been reported and was tracked on #1552 but was then closed out and a new issue was opened #6116 but that was also closed out. As requested by @etraut-openai I am opening a new issue.
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
@etraut-openai here is the new issue since the old issue was incorrectly closed.
<img width="1113" height="626" alt="Image" src="https://github.com/user-attachments/assets/f6bb108d-d860-4a1f-b766-e975c1be1235" />
<img width="820" height="531" alt="Image" src="https://github.com/user-attachments/assets/788d65c4-8653-439f-b162-f2054a78d72a" />
@etraut-openai Tested with version
0.77.0still the issue persists in WSL (Ubuntu)