-
Notifications
You must be signed in to change notification settings - Fork 48
Add a bunch of BYOK providers #3704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
b4a4e1b
Add a bunch of BYOK provider
chrarnoldus d8ed199
Fix
chrarnoldus bc0f0dc
fix(ai-gateway): keep direct BYOK registries ordered
chrarnoldus f0a2922
Merge branch 'main' into christiaan/byok
chrarnoldus 4e41936
Add Inceptron BYOK
chrarnoldus 23df8ee
Simplify
chrarnoldus 70350a9
Fix casing for consistency
chrarnoldus db5b080
Add reasoning.effort => reasoning_effort conversion for consistency
chrarnoldus 8c991f4
fix(ai-gateway): sort BYOK provider entries
chrarnoldus 808b6cd
Don't return the default
chrarnoldus 0f3771f
Use name if present in OpenAI Compatible metadata
chrarnoldus f9a0d3b
Fix casing
chrarnoldus 5033839
Martian fix
chrarnoldus bae3d5c
Synthetic fixes
chrarnoldus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
30 changes: 30 additions & 0 deletions
30
apps/web/src/lib/ai-gateway/providers/direct-byok/crofai.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| import { cachedEnhancedDirectByokModelList } from '@/lib/ai-gateway/providers/direct-byok/model-list'; | ||
| import type { DirectByokProvider } from '@/lib/ai-gateway/providers/direct-byok/types'; | ||
| import { REASONING_VARIANTS_LOW_MEDIUM_HIGH } from '@/lib/ai-gateway/providers/model-settings'; | ||
|
|
||
| export default { | ||
| id: 'crofai', | ||
| base_url: 'https://crof.ai/v1', | ||
| supported_chat_apis: ['chat_completions'], | ||
| default_ai_sdk_provider: 'openai-compatible', | ||
| transformRequest(context) { | ||
| const { request } = context; | ||
| if (request.kind !== 'chat_completions') { | ||
| return; | ||
| } | ||
| request.body.reasoning_effort ??= request.body.reasoning?.effort ?? undefined; | ||
| }, | ||
| models: cachedEnhancedDirectByokModelList({ | ||
| providerId: 'crofai', | ||
| recommendedModels: [ | ||
| { | ||
| id: 'kimi-k2.6', | ||
| name: 'Kimi K2.6', | ||
| flags: ['vision'], | ||
| context_length: 262144, | ||
| max_completion_tokens: 65535, | ||
| }, | ||
| ], | ||
| variants: REASONING_VARIANTS_LOW_MEDIUM_HIGH, | ||
| }), | ||
| } satisfies DirectByokProvider; |
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
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
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
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
24 changes: 24 additions & 0 deletions
24
apps/web/src/lib/ai-gateway/providers/direct-byok/martian.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import { cachedEnhancedDirectByokModelList } from '@/lib/ai-gateway/providers/direct-byok/model-list'; | ||
| import type { DirectByokProvider } from '@/lib/ai-gateway/providers/direct-byok/types'; | ||
| import { REASONING_VARIANTS_LOW_MEDIUM_HIGH } from '@/lib/ai-gateway/providers/model-settings'; | ||
|
|
||
| export default { | ||
| id: 'martian', | ||
| base_url: 'https://api.withmartian.com/v1', | ||
| supported_chat_apis: ['chat_completions', 'messages', 'responses'], | ||
| default_ai_sdk_provider: 'openrouter', | ||
| transformRequest() {}, | ||
| models: cachedEnhancedDirectByokModelList({ | ||
| providerId: 'martian', | ||
| recommendedModels: [ | ||
| { | ||
| id: 'moonshotai/Kimi-K2.6', | ||
| name: 'Kimi-K2.6', | ||
| flags: ['vision'], | ||
| context_length: 262144, | ||
| max_completion_tokens: 65535, | ||
| }, | ||
| ], | ||
| variants: REASONING_VARIANTS_LOW_MEDIUM_HIGH, | ||
| }), | ||
| } satisfies DirectByokProvider; |
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
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
30 changes: 30 additions & 0 deletions
30
apps/web/src/lib/ai-gateway/providers/direct-byok/orcarouter.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| import { cachedEnhancedDirectByokModelList } from '@/lib/ai-gateway/providers/direct-byok/model-list'; | ||
| import type { DirectByokProvider } from '@/lib/ai-gateway/providers/direct-byok/types'; | ||
| import { REASONING_VARIANTS_LOW_MEDIUM_HIGH } from '@/lib/ai-gateway/providers/model-settings'; | ||
|
|
||
| export default { | ||
| id: 'orcarouter', | ||
| base_url: 'https://api.orcarouter.ai/v1', | ||
| supported_chat_apis: ['chat_completions', 'messages', 'responses'], | ||
| default_ai_sdk_provider: 'openai-compatible', | ||
| transformRequest(context) { | ||
| const { request } = context; | ||
| if (request.kind !== 'chat_completions') { | ||
| return; | ||
| } | ||
| request.body.reasoning_effort ??= request.body.reasoning?.effort ?? undefined; | ||
| }, | ||
| models: cachedEnhancedDirectByokModelList({ | ||
| providerId: 'orcarouter', | ||
| recommendedModels: [ | ||
| { | ||
| id: 'kimi/kimi-k2.6', | ||
| name: 'kimi-k2.6', | ||
| flags: ['vision'], | ||
| context_length: 262144, | ||
| max_completion_tokens: 65535, | ||
| }, | ||
| ], | ||
| variants: REASONING_VARIANTS_LOW_MEDIUM_HIGH, | ||
| }), | ||
| } satisfies DirectByokProvider; |
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
30 changes: 30 additions & 0 deletions
30
apps/web/src/lib/ai-gateway/providers/direct-byok/synthetic.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| import { cachedEnhancedDirectByokModelList } from '@/lib/ai-gateway/providers/direct-byok/model-list'; | ||
| import type { DirectByokProvider } from '@/lib/ai-gateway/providers/direct-byok/types'; | ||
| import { REASONING_VARIANTS_LOW_MEDIUM_HIGH } from '@/lib/ai-gateway/providers/model-settings'; | ||
|
|
||
| export default { | ||
| id: 'synthetic', | ||
| base_url: 'https://api.synthetic.new/v1', | ||
| supported_chat_apis: ['chat_completions'], | ||
| default_ai_sdk_provider: 'openai-compatible', | ||
| transformRequest(context) { | ||
| const { request } = context; | ||
| if (request.kind !== 'chat_completions') { | ||
| return; | ||
| } | ||
| request.body.reasoning_effort ??= request.body.reasoning?.effort ?? undefined; | ||
| }, | ||
| models: cachedEnhancedDirectByokModelList({ | ||
| providerId: 'synthetic', | ||
| recommendedModels: [ | ||
| { | ||
| id: 'moonshotai/Kimi-K2.6', | ||
| name: 'Kimi-K2.6', | ||
| flags: ['vision'], | ||
| context_length: 262144, | ||
| max_completion_tokens: 65535, | ||
| }, | ||
| ], | ||
| variants: REASONING_VARIANTS_LOW_MEDIUM_HIGH, | ||
| }), | ||
| } satisfies DirectByokProvider; |
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.