Skip to content

feat: add compatibility mode for openai-compatible providers#44

Merged
albanm merged 1 commit into
mainfrom
fix-litellm
Jun 26, 2026
Merged

feat: add compatibility mode for openai-compatible providers#44
albanm merged 1 commit into
mainfrom
fix-litellm

Conversation

@albanm

@albanm albanm commented Jun 26, 2026

Copy link
Copy Markdown
Member

Add a Compatibility Mode option to the openai-compatible provider.

When set to compatible, the model is created against the legacy chat-completions endpoint (openai.chat()) instead of the default /v1/responses endpoint. This makes the platform work with gateways like LiteLLM and older OpenAI-compatible APIs that don't support /v1/responses. Defaults to standard OpenAI behavior, so existing providers are unaffected.

Why: some OpenAI-compatible backends (notably LiteLLM) don't implement the newer /v1/responses API and need the chat-completions path.

- Add optional 'compatibility' field to openai-compatible provider schema
- When set to 'compatible', uses /v1/chat/completions instead of /v1/responses
- Fixes support for LiteLLM and other providers without responses API support
@albanm albanm merged commit 785994d into main Jun 26, 2026
4 checks passed
@albanm albanm deleted the fix-litellm branch June 26, 2026 13:17
albanm added a commit that referenced this pull request Jun 26, 2026
…ndpoint

A Scaleway API key scoped to a specific Project returned 403 "insufficient
permissions" on the hardcoded https://api.scaleway.ai/v1 URL (the org default
project), so the model dropdown was empty. Add an optional Project ID on the
Scaleway provider and target https://api.scaleway.ai/{projectId}/v1 when set.

Also switch Scaleway inference to the .chat() model: the default callable in
@ai-sdk/openai v3 targets /v1/responses, which Scaleway does not implement
(returns 422 ROUTE NOT SUPPORTED) — same fix applied to openai-compatible in #44.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant