Support for Custom Endpoints

Resolved 💬 3 comments Opened Aug 8, 2025 by wklimowicz Closed Nov 28, 2025
💡 Likely answer: A maintainer (bolinfest, collaborator) responded on this thread — see the highlighted reply below.

I want to use codex with an endpoint that doesn't end with /chat/completions. For example the default endpoint on Databricks is /invocations. The code below works, but as far as I can tell there's no way of getting codex working with this endpoint at the moment:

curl -X POST "https://adb-12345678910.1.azuredatabricks.net/serving-endpoints/databricks-llama-4-maverick/invocations" \
  -H "Authorization: Bearer $DATABRICKS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"messages": [{"role": "user", "content": "test"}]}'

LibreChat have had a similar issue, and they solved it by adding a directEndpoint and titleMessageRole setting. I'm not sure what the most elegant way to implement this is, but it would be nice if Databricks endpoints were supported.

View original on GitHub ↗

3 Comments

bolinfest collaborator · 1 year ago

This is the list of providers when we had a long list of built-in ones in the TypeScript CLI:

https://github.com/openai/codex/blob/307d9957fa56ec41706e99ca34417aa64c35eeeb/codex-cli/src/utils/providers.ts

so fwiw, all of these followed the /chat/completions convention...

Nevertheless, I would consider a PR that added an extra option to a model_provider like "exact URL" or something to make this work.

tilman-sattler · 11 months ago

I second that, being able to send requests through a proxy or to a custom endpoint might be a useful feature in general.

etraut-openai contributor · 9 months ago

This feature request hasn't had any activity in a couple of months, and it's unlikely that we would implement this, so I'm going to close.