I'd like to contribute a new provider for Bailing AI models to the AI SDK. Bailing (百灵) is a series of large AI models, and I'm the developer who implemented the integration. #9556
Qianqian117
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I'd like to contribute a new provider for Bailing AI models to the AI SDK. Bailing (百灵) is a series of large AI models, and I'm the developer who implemented the integration.
Provider Details
I've already implemented the Bailing provider with support for their Ling-1T and Ring-1T models. The implementation follows the OpenAI-compatible provider pattern and includes:
Core Functionality:
Text generation with bailing('Ling-1T') or bailing.chatModel('Ling-1T')
API key configuration through options or BAILING_API_KEY environment variable
Custom base URL support
Special Features:
Web search capabilities via enable_search and search_options
Support for various generation parameters (temperature, top_p, etc.)
Reasoning effort and text verbosity controls
Documentation
The official Bailing API documentation can be found at: https://alipaytbox.yuque.com/sxs0ba/ling/api_chat
Usage Example
`import { bailing } from '@ai-sdk/bailing';
import { generateText } from 'ai';
// Basic usage
const { text } = await generateText({
model: bailing('Ling-1T'),
prompt: 'Hello, world!',
});
// With web search enabled
const { text: searchResult } = await generateText({
model: bailing('Ling-1T'),
prompt: 'What is the latest news about AI?',
providerOptions: {
bailing: {
enable_search: true,
search_options: {
forced_search: false
}
}
}
});`
Free Tier
Bailing offers a generous free tier with 500,000 tokens per day for each user.
Request
Before submitting the PR, I wanted to check if this contribution would be welcome and if there are any specific requirements or guidelines I should follow for adding a new provider to the AI SDK.
AI SDK Version
No response
Code of Conduct
I agree to follow this project's Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions