Skip to content

[Feat] Add OpenAI-compatible inference provider option#562

Merged
mrubens merged 2 commits into
developfrom
feature/openai-compatible-provider-2n8upenzo1lqa
Jul 18, 2026
Merged

[Feat] Add OpenAI-compatible inference provider option#562
mrubens merged 2 commits into
developfrom
feature/openai-compatible-provider-2n8upenzo1lqa

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Opened on behalf of Matt Rubens. View the task or mention @roomote-roomote for follow-up asks.

Related issue

Fixes #560

Linked work items

Closes #560

Why this PR exists

  • A maintainer explicitly invited this PR in the linked issue or discussion
  • I am a maintainer / this is internal Roomote work

What changed

Adds a first-class OpenAI-compatible inference provider so operators can connect any OpenAI API endpoint (LiteLLM proxy, local server, custom gateway, etc.) without guessing between LiteLLM, Ollama, or vLLM.

  • Setup catalog entry using OPENAI_COMPATIBLE_BASE_URL and optional OPENAI_COMPATIBLE_API_KEY
  • Model discovery and qualification via the shared /v1/models + /v1/chat/completions path
  • Inference gateway routing and worker OpenCode @ai-sdk/openai-compatible config
  • Public docs page and env-var reference
  • Worker configs no longer fall back generic OpenAI-compatible endpoints to OPENAI_API_KEY / OPENAI_BASE_URL

Existing LiteLLM, Ollama, and vLLM providers stay as dedicated named options.

How it was tested

  • pnpm --filter @roomote/types exec vitest run for provider catalog and gateway tests
  • pnpm --filter @roomote/web exec vitest run for local provider discovery and provider setup fixtures
  • pnpm --filter @roomote/worker exec vitest run for OpenCode provider config, including keyless openai-compatible isolation and gateway rebase
  • Typecheck on @roomote/types, @roomote/web, and @roomote/worker
  • pnpm --filter @roomote/docs check
  • Pre-push suite on push

Screenshots

Settings Models Add Provider dropdown listing OpenAI-compatible

Checklist

  • The PR title follows the repo convention: [Fix], [Feat], [Improve], [Refactor], [Docs], or [Chore] followed by a user-facing description
  • This PR is small and scoped to one change
  • pnpm lint and pnpm check-types pass locally
  • I added tests or included a clear manual validation note above
  • I removed secrets, tokens, private keys, and customer data from code, logs, and screenshots
  • If this change should appear in the changelog, I ran pnpm changeset

Add a first-class OpenAI-compatible endpoint provider so operators can
connect any OpenAI API server without guessing LiteLLM, Ollama, or vLLM.
@roomote-roomote

roomote-roomote Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

No new code issues found. See task

  • apps/worker/src/run-task/agent-home.ts:725-737 The new openai-compatible provider falls back to OPENAI_API_KEY when its optional key is blank, sending that unrelated credential to the configured arbitrary endpoint. Setup qualification omits this header, so a keyless endpoint that rejects bearer auth can pass setup but fail every task; use only OPENAI_COMPATIBLE_API_KEY or no header for this provider.

Reviewed a1e53ee

@mrubens

mrubens commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

@roomote-roomote address the feedback and fix tests

@roomote-roomote

Copy link
Copy Markdown
Contributor Author

I'm on it. I routed this request into the existing PR task so follow-up work stays on one Roomote thread for this PR, and I'll keep updates here. See task

@roomote-roomote

roomote-roomote Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

Fixed the review feedback and CI fixture failure in a1e53ee.

  • openai-compatible now uses only OPENAI_COMPATIBLE_API_KEY (or no API key); it no longer falls back to OPENAI_API_KEY / OPENAI_BASE_URL
  • Added worker coverage for keyless isolation and gateway rebase
  • Updated the provider-setup fixture for OPENAI_COMPATIBLE_BASE_URL

Keep OpenAI-compatible providers on dedicated env vars only,
and update the fixture expecting the new non-secret base URL.
@mrubens
mrubens marked this pull request as ready for review July 18, 2026 23:33
@mrubens
mrubens merged commit 102dd47 into develop Jul 18, 2026
18 checks passed
@mrubens
mrubens deleted the feature/openai-compatible-provider-2n8upenzo1lqa branch July 18, 2026 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Add 'OpenAI-compatible' provider option — unified setup for any OpenAI-API endpoint

1 participant