Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/en-US/model-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Sdcb Chats supports 22+ mainstream AI model providers. Here is the complete list
| 20 | Anthropic | [2025-11-24](https://github.com/sdcb/chats/commit/22ebef98) | ✅ |
| 21 | Xiaomi Mimo | [2025-12-17](https://github.com/sdcb/chats/commit/026f1a4e) | ✅ |
| 22 | Novita AI | [2026-03-13](https://github.com/sdcb/chats/commit/cecfc66d) | ✅ |
| 23 | Requesty | [2026-07-04](https://requesty.ai) | ❓ |

## Notes

Expand Down
1 change: 1 addition & 0 deletions doc/zh-CN/model-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Sdcb Chats 支持 22+ 主流 AI 模型服务商,以下是完整列表:
| 20 | Anthropic | [2025-11-24](https://github.com/sdcb/chats/commit/22ebef98) | ✅ |
| 21 | 小米Mimo | [2025-12-17](https://github.com/sdcb/chats/commit/026f1a4e) | ✅ |
| 22 | Novita AI | [2026-03-13](https://github.com/sdcb/chats/commit/cecfc66d) | ✅ |
| 23 | Requesty | [2026-07-04](https://requesty.ai) | ❓ |

## 注意事项

Expand Down
1 change: 1 addition & 0 deletions src/BE/db/Enums/DBModelProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ public enum DBModelProvider
Anthropic = 20,
Mimo = 21,
Novita = 22,
Requesty = 23,
}
6 changes: 6 additions & 0 deletions src/BE/web/DB/ModelProviderInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,12 @@ private record ProviderInfo(
"https://api.novita.ai/openai",
""
),
[DBModelProvider.Requesty] = new(
DBModelProvider.Requesty,
"Requesty",
"https://router.requesty.ai/v1",
"rqsty-sk-***"
),
};

private static readonly Dictionary<string, DBModelProvider> _nameToIdMap = _providers
Expand Down
1 change: 1 addition & 0 deletions src/BE/web/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public static async Task Main(string[] args)
builder.Services.AddSingleton<Services.Models.ChatServices.OpenAI.SiliconFlowChatService>();
builder.Services.AddSingleton<Services.Models.ChatServices.OpenAI.TokenPonyChatService>();
builder.Services.AddSingleton<Services.Models.ChatServices.OpenAI.OpenRouterChatService>();
builder.Services.AddSingleton<Services.Models.ChatServices.OpenAI.RequestyChatService>();
builder.Services.AddSingleton<Services.Models.ChatServices.OpenAI.Special.ResponseApiService>();
builder.Services.AddSingleton<Services.Models.ChatServices.OpenAI.Special.AzureResponseApiService>();
builder.Services.AddSingleton<Services.Models.ChatServices.OpenAI.MiniMaxChatService>();
Expand Down
1 change: 1 addition & 0 deletions src/BE/web/Services/Models/ChatServices/ChatFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public ChatService CreateChatService(Model model)
DBModelProvider.SiliconFlow => sp.GetRequiredService<SiliconFlowChatService>(),
DBModelProvider.TokenPony => sp.GetRequiredService<TokenPonyChatService>(),
DBModelProvider.OpenRouter => sp.GetRequiredService<OpenRouterChatService>(),
DBModelProvider.Requesty => sp.GetRequiredService<RequestyChatService>(),
DBModelProvider.Novita => sp.GetRequiredService<NovitaChatService>(),
_ => sp.GetRequiredService<ChatCompletionService>() // Fallback to OpenAI-compatible
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using Chats.DB;

namespace Chats.BE.Services.Models.ChatServices.OpenAI;

public class RequestyChatService(IHttpClientFactory httpClientFactory, HostUrlService hostUrlService) : ChatCompletionService(httpClientFactory)
{
protected override void AddAuthorizationHeader(HttpRequestMessage request, ModelKeySnapshot modelKey)
{
base.AddAuthorizationHeader(request, modelKey);
request.Headers.Add("X-Title", "Sdcb Chats");
request.Headers.Add("HTTP-Referer", hostUrlService.GetFEUrl());
}
}
8 changes: 8 additions & 0 deletions src/FE/public/logos/requesty.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/FE/types/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export enum DBModelProvider {
Anthropic = 20,
Mimo = 21,
Novita = 22,
Requesty = 23,
}

export type FEModelProvider = {
Expand Down Expand Up @@ -136,6 +137,12 @@ export const feModelProviders: FEModelProvider[] = [
name: 'Novita AI',
icon: '/logos/novita.svg',
},
{
id: DBModelProvider.Requesty,
name: 'Requesty',
icon: '/logos/requesty.svg',
allowWebSearch: true,
},
];

export interface ChatModelFileConfig {
Expand Down