You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Add query parameter support for custom OpenAI-compatible providers #7198
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Problem:
When configuring custom OpenAI-compatible providers, there's currently no way to add query parameters to API requests. Some OpenAI-compatible APIs require query parameters (e.g., ?api-version=2024-01-01) rather than or in addition to headers for configuration.
Currently, the @ai-sdk/openai-compatible package only supports:
baseURL
apiKey
headers
fetch (custom function)
Use Case:
Some providers like Azure OpenAI Service variants or custom enterprise APIs require query parameters for:
API versioning (api-version)
Tenant/workspace identifiers
Feature flags or capabilities
Authentication tokens in query string format
Current Workaround:
The only workaround is implementing a custom fetch function that intercepts requests and manually appends query parameters, which is not straightforward or well-documented.
Proposed Solution:
Add a queryParams option to provider configuration:
Activity
github-actions commentedon Jan 7, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if your feature request specifically requires query parameter support beyond what these issues address.
Awowen commentedon Jan 8, 2026
I'd like to work on this issue. Can I be assigned?
rekram1-node commentedon Jan 8, 2026
sure
feat: add query parameter support for OpenAI-compatible providers
rsanchezc-pg commentedon Feb 10, 2026
@rekram1-node can this be reviewed, please? 🙏🏼
#7375
github-actions commentedon Apr 12, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.