SIGN IN SIGN UP

Answer the OpenAI-shaped calls from wherever the deployment says (#13)

* Answer the OpenAI-shaped calls from wherever the deployment says

OpenBot already runs on your own machine, in your own PostgreSQL, with a
model key you supply. The one thing it could not do was decide where that
key is spent: `agent-bot` constructed its client with a key and no base
URL, `agent-langgraph` did the same through `ChatOpenAI`, and compose
handed neither of them a way to be told otherwise. A deployment that had
put a gateway or a proxy in front of its models, or that runs the model
on hardware it controls, had to fork two files to use it.

`OPENAI_BASE_URL` is that decision, and the API server already honoured
it: `resolveModel` in the pinned runtime reads it for every `openai/*`
model, so the package built-in agents have always been movable. This
gives the two shipped Bots the same variable and hands it to both
containers, so one line moves the whole deployment rather than the half
of it that happens to run outside Docker.

It is a base URL rather than another `BOT_PROVIDER` branch because the
API is the contract. `anthropic` and `google` are different APIs, not
different URLs for this one, and they are untouched. Model names travel
verbatim in `BOT_MODEL` and in the tenant package's `default_model`,
because an endpoint names its own catalogue.

Verified against a live OpenAI-compatible gateway: both Bots stream
AG-UI and emit tool calls, which is what a Bot needs to drive its
computer.

* Point the other two providers somewhere else as well

The OpenAI half of this landed the right idea and stopped one provider short.
A deployment that fronts Anthropic or Google the same way, or runs either on
its own hardware, had the same silent split this change set out to remove:
the API server would follow and agent-langgraph would not.

Both use the names the API server already reads, so one line still moves the
built-in agents and the Bot together.

agent-bot is untouched. It speaks the OpenAI API directly by construction, so
there is no Anthropic or Google call in it to redirect.

---------

Co-authored-by: David McKay <davidmckayv@users.noreply.github.com>
K
knowhy committed
019e647d80a3f684eaf95acf9ba3d16df68f21f8
Parent: 68cc78d
Committed by GitHub <noreply@github.com> on 8/19/2026, 9:38:51 PM