Skip to content

Add back support for OPENAI_API_BASE environment variable #745

@igoralveslima

Description

@igoralveslima

Confirm this is a feature request for the Python library and not the underlying OpenAI API.

  • This is a feature request for the Python library

Describe the feature or improvement you're requesting

For my environment I need to configure this library via environment variables. I use to be able to define the base URL via OPENAI_API_BASE but no longer can. I am also not able to define a base_url and a AZURE_OPENAI_ENDPOINT at the same time.

I understand v1 now exposes the ability for set base_url with _httpx.URL, but after reading the httpx documentation, it does not seem immediately clear how to do so via environment variables.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions