Skip to content

docs: document OPENAI_BASE_URL /v1 requirement (#2533) - #2556

Open
KunyangZhang wants to merge 1 commit into
huggingface:mainfrom
KunyangZhang:docs/openai-base-url-v1
Open

docs: document OPENAI_BASE_URL /v1 requirement (#2533)#2556
KunyangZhang wants to merge 1 commit into
huggingface:mainfrom
KunyangZhang:docs/openai-base-url-v1

Conversation

@KunyangZhang

Copy link
Copy Markdown
Contributor

No description provided.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d9f4618b24

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

| llama.cpp | `http://127.0.0.1:8080/v1` |
| OpenRouter | `https://openrouter.ai/api/v1` |

> **Important:** `OPENAI_BASE_URL` must include the API version prefix used by your provider, usually `/v1`. Chat UI appends `/models` to this value to discover available models, so an origin-only value such as `https://api.example.com` returns `404`. Do not set it to an endpoint that already includes `/chat/completions` — Chat UI sends that path itself when completing requests.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Don't require a version segment in every base URL

This describes /v1 as mandatory even though the implementation treats OPENAI_BASE_URL as an arbitrary common prefix: it only strips a trailing slash and requests ${baseURL}/models, while the OpenAI client appends chat/completions. Consequently, an OpenAI-compatible provider or reverse proxy that exposes GET /models and POST /chat/completions at its origin works with an origin-only value; the new guidance incorrectly tells those users it will 404. Describe the value as the common API prefix required by the configured provider rather than requiring a version segment.

Useful? React with 👍 / 👎.

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