Two env vars make the OpenAI provider point at any compatible Responses API endpoint

geoffdavies-dt (Dovetail) added `OPENAI_BASE_URL` and `OPENAI_AUTH_HEADER` to the OpenAI provider so mike can talk to Azure OpenAI or any other Responses-compatible endpoint. About 20 lines of code, fully backwards-compatible.

infrastructureintegration

backend/src/lib/llm/openai.ts previously had the OpenAI Responses URL hardcoded. This change replaces it with two small helpers: responsesUrl() reads OPENAI_BASE_URL, strips trailing slashes, and appends /responses; authHeaders() checks OPENAI_AUTH_HEADER and returns either Authorization: Bearer <key> or api-key: <key>. Both default to the existing OpenAI behavior when the env vars are absent.

The named use case is Azure OpenAI / Azure AI Foundry. Set OPENAI_BASE_URL=https://your-resource.cognitiveservices.azure.com/openai/v1 and OPENAI_AUTH_HEADER=api-key and the provider routes through Azure. The fork author notes that Azure deployment names need to match mike's model IDs (gpt-5.5, gpt-5.4-mini, gpt-5.4-nano) - they're aligning their Azure resource to mike's naming rather than adding a model-ID mapping layer, which keeps the patch minimal.

One caveat: this targets the Azure AI Foundry /openai/v1/responses endpoint, not the older deployments/{name}/completions?api-version=... shape. Anyone on an older Azure API version or using a Chat Completions-only proxy would need to adapt further.

So what Worth importing if you're running mike behind Azure OpenAI, LiteLLM, vLLM, or any other OpenAI-compatible gateway. The patch is ~20 lines, zero behavioral change for the default path, and the two env vars are documented with examples. Pull `d3840fda`; ignore the merge commits.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

3 commits from geoffdavies-dt/mike, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
d3840fda Add configurable OpenAI-compatible endpoint geoffdavies-dt 2026-05-12 ↗ GitHub
4f52bd7c Merge branch 'main' into codex/inspect-mike-oss-model-provider-for-azure-openai geoffdavies-dt 2026-05-13 ↗ GitHub
3e8330da Merge pull request #1 from geoffdavies-dt/codex/inspect-mike-oss-model-provider-for-azure-openai geoffdavies-dt 2026-05-13 ↗ GitHub
Add OpenAI-compatible Responses API support (custom base URL & auth header) and update docs

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-438.md from inside the repo you want the changes in.

⬇ Download capture-thread-438.md