OpenAI added as third LLM provider (GPT-5.5, GPT-5.4 Nano)

nforum adds OpenAI support alongside Claude and Gemini, following the same BYOK pattern already established for the other two providers.

infrastructureintegration

The feature commit (860e6ff) is mostly additive. A new backend/src/lib/llm/openai.ts implements streamOpenAI and completeOpenAIText with streaming tool-call accumulation. Migration 001_add_openai_api_key.sql adds an openai_api_key column to user_profiles. The frontend's ModelToggle.tsx and modelAvailability.ts get an "OpenAI" group gated on key presence. Model ids: gpt-5.5 for main, gpt-5.4-nano for mid-tier (tabular review) and low-tier (title generation). Provider routing in models.ts matches on gpt-, o1-, o3-, and o4- prefixes.

The diff touches 19 files but the changes are largely mechanical extensions of existing patterns - the implementation is self-contained and doesn't restructure anything.

Note: this PR landed before the LocalLLM/vLLM PR, and a separate reconciling merge later unified both under a single openai.ts with a getClient(model) factory. If you pull this topic in isolation, also check that merge to understand what the combined state looks like.

So what Straightforward to pull if you want OpenAI as an additional provider option. The diff is additive and follows the existing per-user BYOK pattern cleanly. Check the reconciling vLLM merge as well - it modifies `openai.ts` further and changes some defaults.

View this fork on GitHub →

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

Commits in this thread

2 commits from nforum/mike, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
860e6ff5 Add OpenAI as third LLM provider (GPT-5.5, GPT-5.4 Nano) Tom Griffin 2026-05-01 ↗ GitHub
commit body
Adds full OpenAI support across backend and frontend, following the
existing Claude/Gemini provider pattern: streaming chat with tool use,
text completion, model selection UI, API key management, and DB schema.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
54be20d5 Merge PR #16: Add OpenAI as third LLM provider (GPT-5.5, GPT-5.4 Nano) Bojan Plese 2026-05-07 ↗ GitHub

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-51.md from inside the repo you want the changes in.

⬇ Download capture-thread-51.md