Skip to content

feat(openai): allow OPENAI_BASE_URL for OpenAI-compatible endpoints - #5

Open
coding-crying wants to merge 2 commits into
eslavnov:mainfrom
coding-crying:feat/openai-base-url
Open

feat(openai): allow OPENAI_BASE_URL for OpenAI-compatible endpoints#5
coding-crying wants to merge 2 commits into
eslavnov:mainfrom
coding-crying:feat/openai-base-url

Conversation

@coding-crying

@coding-crying coding-crying commented Mar 13, 2026

Copy link
Copy Markdown

This adds support for configuring the OpenAI Python client base URL via an OPENAI_BASE_URL env var.

Motivation: allow using local/self-hosted OpenAI-compatible TTS endpoints (e.g., MOSS-TTS) while still using the OpenAI SDK streaming response helper.

Also adds OPENAI_TTS_VOICES (comma-separated) to override the advertised OpenAI voices list for OpenAI-compatible endpoints that do not expose voice discovery.

Behavior:

  • If OPENAI_BASE_URL is set, construct OpenAI(base_url=OPENAI_BASE_URL)
  • Otherwise keep current default OpenAI() behavior.
  • If OPENAI_TTS_VOICES is set, advertise those voices under the OpenAI provider instead of the defaults from voices.json.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant