Skip to content

Connection Error on Windows When Running Official LiteLLM Example #836

Open
@qpoisson

Description

@qpoisson

Please read this first

  • Have you read the docs?Agents SDK docs YES
  • Have you searched for related issues? Others may have faced similar issues. YES

Describe the bug

I encountered a reproducible issue when running the official LiteLLM example as described at https://openai.github.io/openai-agents-python/models/litellm/ with any openai modle ( e.g, openai/gpt-4o) and a valid OpenAI API key

The example works correctly on both Ubuntu and macOS environments. However, when executed on a Windows machine, the application consistently fails with a connection error: litellm.exceptions.InternalServerError: litellm.InternalServerError: InternalServerError: OpenAIException - Connection error.

Debug information

  • Agents SDK version: 0.0.17
  • litellm version: 1.72.2
  • Python version 3.12.7

Repro steps

  1. Follow the example code provided at the documentation link above.
  2. Run the script in a Windows environment.
  3. Observe that the connection to the API fails immediately.

Expected behavior

The code should function identically across all major OS platforms, including Windows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions