DNS resolution issue with Azure OpenAI provider when running in WSL

Open 💬 3 comments Opened Nov 19, 2025 by illgitthat

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.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗