Skip to content

[Bug]: OpenAIChatModel doesn't use env proxy #2575

@kushalbhabra

Description

@kushalbhabra

Language

Javascript/Typescript

Version

v2-preview

Description

When using OpenAIChatModel, environment variables for proxy are ignored.

// OpenAI model setup
const model = new OpenAIChatModel({
  apiKey: process.env.AZURE_OPENAI_API_KEY!,
  endpoint: process.env.AZURE_OPENAI_ENDPOINT!,
  apiVersion: process.env.AZURE_OPENAI_API_VERSION!,
  model: process.env.AZURE_OPENAI_DEPLOYMENT_NAME!,
 
});

The connection to model is internally handled by @teams.openai package which doesn't use environment proxy

Reproduction Steps

1.Set https_proxy, proxy and no_proxy env variables
2.Run sample chat app with OpenAIChatModel
3.The connection is done without proxy

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