feat: add compatibility mode for openai-compatible providers#44
Merged
Conversation
- 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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a Compatibility Mode option to the
openai-compatibleprovider.When set to
compatible, the model is created against the legacy chat-completions endpoint (openai.chat()) instead of the default/v1/responsesendpoint. 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/responsesAPI and need the chat-completions path.