[Bug]: Proxy environment issues prevent access to OpenAI
Is there an existing issue for the same bug?
- [x] I have checked the existing issues.
Describe the bug and reproduction steps
when i start the docker first (set https_proxy, https_proxy in the docker run cmd by using -e flag, and then let docker sleep inifity), and then i enter docker environments (docker exec -it openhands-app /bin/bash), try to request openai api (by running "python3 test_api.py"), the api call can work successfully.
however, when at the same time, i run the openhands start cmd: docker exec -it openhands-app /bin/bash -c "/app/entrypoint.sh uvicorn openhands.server.listen:app --host 0.0.0.0 --port 3000" , my api request fails, the error log goes:
" File "/app/.venv/lib/python3.12/site-packages/litellm/main.py", line 3085, in completion raise exception_type( ^^^^^^^^^^^^^^^ File "/app/.venv/lib/python3.12/site-packages/litellm/litellm_core_utils/exception_mapping_utils.py", line 2201, in exception_type raise e File "/app/.venv/lib/python3.12/site-packages/litellm/litellm_core_utils/exception_mapping_utils.py", line 1988, in exception_type raise AuthenticationError( litellm.exceptions.AuthenticationError: litellm.AuthenticationError: AzureException AuthenticationError - Error code: 401 - {'error': {'message': 'invalid target region, request denied', 'code': '-1016'}} "
it seems that i have made the proxy http correctly for the docker container (since i can run the test_api.py script successfully), but the openhands app cannot correctly use the proxy?
can anybody help me to fix this issue? thanks
OpenHands Installation
Docker command in README
OpenHands Version
SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.24-nikolaik
Operating System
None
Logs, Errors, Screenshots, and Additional Context
No response
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for over 30 days with no activity.