OpenAI added as a third LLM provider with gpt-5.5 and gpt-5.4-nano

thegrif extends the two-provider Claude/Gemini setup to include OpenAI in a single commit. The change is additive across backend, frontend, and database, and leaves existing defaults in place.

integrationinfrastructure

The backend adapter in openai.ts follows the same shape as the Claude and Gemini drivers - a streaming tool-use loop plus a completeText path. Routing in llm/index.ts adds a provider === "openai" branch, and providerForModel in models.ts routes any model id starting with gpt-, o1-, o3-, or o4- to OpenAI. That prefix list covers future model releases without further changes.

Default models are untouched. gemini-3-flash-preview stays as DEFAULT_MAIN_MODEL and DEFAULT_TABULAR_MODEL. OpenAI only becomes the title model fallback when neither Gemini nor Claude keys are set, so existing users see no behavior change on upgrade.

The DB migration is handled two ways: 001_add_openai_api_key.sql uses add column if not exists for existing installs, while 000_one_shot_schema.sql is edited in place for fresh setups. Both paths land on the same schema.

Two things to check before pulling: the model ids gpt-5.5 and gpt-5.4-nano are what's committed, so verify they match OpenAI's current catalog. And streamOpenAI swallows JSON parse errors on streamed tool-call arguments with an empty catch returning {} - that's fine for the happy path, but tool failures will be opaque.

So what Worth a look if you want optional OpenAI support alongside Claude and Gemini. The diff is clean and follows the existing provider contract. Verify the model ids and check that the silent tool-argument error handling is acceptable for your use case before adopting.

View this fork on GitHub →

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

Commits in this thread

1 commit from thegrif/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>

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

⬇ Download capture-thread-135.md