Add BitRouter provider#2754
Open
SPIKESPIGEL404 wants to merge 1 commit into
Open
Conversation
BitRouter (https://bitrouter.ai) is an OpenAI-compatible LLM gateway. - provider.toml: @ai-sdk/openai-compatible, BITROUTER_API_KEY, api.bitrouter.ai/v1 - 50 models mirrored from the live https://api.bitrouter.ai/v1/models catalog, factored onto existing base_models where available (4 standalone where no canonical base exists yet). - reasoning_content surfaced via [interleaved]; verified live against the gateway.
caad606 to
6f969c1
Compare
Collaborator
|
AUTOMATED REVIEW: Blocking merge: add the provider logo; add explicit provider-specific |
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.
What
Adds BitRouter as a provider. BitRouter is an OpenAI-compatible LLM gateway, so it uses the generic
@ai-sdk/openai-compatiblepackage — no new SDK dependency.Models
50 models, mirrored from the live
https://api.bitrouter.ai/v1/modelscatalog:base_models, overriding only[cost]and[limit]with BitRouter's live pricing/limits (same pattern asproviders/kilo/providers/anyapi).deepseek/deepseek-v3.2,openai/gpt-oss-120b,x-ai/grok-4.1-fast,x-ai/grok-4.20).Reasoning
Each model declares
[interleaved] field = "reasoning_content". Verified live against the gateway: BitRouter normalizes upstream reasoning traces to thereasoning_contentfield on the Chat Completions envelope (both streamed output and replayed back on input), which matches the openai-compatible reasoning path.Validation
bun run validatepasses.