Skip to content

docs(faq): note OPENAI_BASE_URL env var for pointing clients at LocalAI - #11310

Open
seven7763 wants to merge 1 commit into
mudler:masterfrom
seven7763:docs/openai-compatible-gateway-example
Open

docs(faq): note OPENAI_BASE_URL env var for pointing clients at LocalAI#11310
seven7763 wants to merge 1 commit into
mudler:masterfrom
seven7763:docs/openai-compatible-gateway-example

Conversation

@seven7763

@seven7763 seven7763 commented Aug 3, 2026

Copy link
Copy Markdown

Clarify how an existing OpenAI client is pointed at LocalAI, in the FAQ answer to "Can I use it with a Discord bot, or XXX?".

That answer already says a client can be pointed at the LocalAI endpoint, but not how. The tip documents the OPENAI_BASE_URL / OPENAI_API_BASE environment variables that most clients read, and notes that clients insisting on a non-empty API key accept any placeholder value while api_keys is unset.

Docs only (FAQ).


Revised after review. The first version of this PR promoted a third-party hosted gateway and carried campaign-tracking parameters in the link. Both are gone — the diff now names and links no product at all, and the remaining tip stays on the section's own topic. AI attribution was moved from a Co-Authored-By trailer to Assisted-by, per .agents/ai-coding-assistants.md, and the commit now carries a human Signed-off-by for DCO.

@localai-org-maint-bot localai-org-maint-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the contribution, but this does not fit the LocalAI FAQ as submitted. The added paragraph promotes an unrelated hosted gateway (including campaign-tracking parameters) in a section whose purpose is explaining how clients connect to LocalAI; please remove that promotion.

The commit also fails the repository DCO check and uses an AI Co-Authored-By trailer, which LocalAI .agents/ai-coding-assistants.md explicitly disallows. If you revise the contribution, please replace AI co-authorship with the documented Assisted-by attribution and have the human contributor add their own DCO sign-off.

The "Can I use it with a Discord bot, or XXX?" answer says a client can be
pointed at the LocalAI endpoint, but not how. Most OpenAI clients pick the
endpoint up from OPENAI_BASE_URL, and clients that insist on a non-empty API
key accept any placeholder value while api_keys is unset.

Assisted-by: Claude:claude-opus-5
Signed-off-by: seven7763 <seven7763@users.noreply.github.com>
@seven7763
seven7763 force-pushed the docs/openai-compatible-gateway-example branch from 85c12a2 to 7f6688f Compare August 12, 2026 18:08
@seven7763

Copy link
Copy Markdown
Author

Thanks for the review — both points were fair, and I've rewritten the PR rather than argue them.

Promotion removed. The hosted-gateway mention and its campaign-tracking parameters are gone entirely; the diff now contains no third-party name or link. Rather than leave an empty PR, I kept a tip that stays on the section's actual topic — how to point an existing client at LocalAI — and names no product:

Tip: Many clients read the endpoint from the OPENAI_BASE_URL environment variable (older ones use OPENAI_API_BASE), so pointing an existing app at LocalAI is often just OPENAI_BASE_URL=http://localhost:8080/v1. Clients that insist on a non-empty API key accept any placeholder value, unless you have configured api_keys.

Attribution and DCO fixed. Dropped the AI Co-Authored-By trailer and replaced it with Assisted-by: Claude:claude-opus-5 in the documented format, and added my own Signed-off-by.

I also reverted a stray blank line the first version had introduced under "Can this leverage GPUs?", so the diff is now a single added line.

If you'd rather the FAQ not carry this tip at all, just say so and I'll drop it — no attachment to the remaining wording.

@seven7763 seven7763 changed the title docs: note OpenAI client base_url for multi-model gateways docs(faq): note OPENAI_BASE_URL env var for pointing clients at LocalAI Aug 12, 2026

@localai-org-maint-bot localai-org-maint-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@mudler This now looks good from my side. The promotional reference is gone, the remaining FAQ tip is scoped to connecting existing clients to LocalAI, and the commit attribution and DCO sign-off follow the repository policy. I also checked the current one-file diff with git diff --check; it passes.

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.

2 participants