Skip to content

Feature request: Add support for a custom OpenAI API base URL in terminal-chat #938

@winxuan

Description

@winxuan

Type of issue

Typo

Feedback

Summary

Please add support for configuring a custom OpenAI API base URL in terminal-chat.

Problem Statement

Currently, terminal-chat appears to assume the default OpenAI API endpoint. This makes it difficult or impossible to use:

  • OpenAI-compatible API providers
  • self-hosted gateways / proxies
  • Azure/OpenAI-compatible endpoints
  • internal enterprise API gateways
  • regional or custom routing setups
    For users in these scenarios, being able to specify a custom API base URL is very important.

Proposed Solution

Add a configuration option for the OpenAI API base URL, for example through:

  • an environment variable such as OPENAI_BASE_URL or OPENAI_API_BASE
  • a CLI flag
  • a config file entry
    Example:
export OPENAI_API_KEY=your_key
export OPENAI_BASE_URL=https://your-custom-endpoint.example.com/v1

### Page URL

https://learn.microsoft.com/zh-cn/windows/terminal/terminal-chat

### Content source URL

https://github.com/MicrosoftDocs/terminal/blob/main/TerminalDocs/terminal-chat.md

### Author

@mattwojo

### Document Id

3fe11b4f-d80e-ed2b-ac9c-c4dc8bc48e61

### Platform Id

d182aa64-1eb7-ad96-b6a2-70ee57f76313

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