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
10 changes: 10 additions & 0 deletions TelegramSearchBot.Common/Model/AI/AuthorizationSource.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace TelegramSearchBot.Model.AI {
/// <summary>
/// ChannelWithModel 授权来源。Manual = 管理员手工添加,永不被刷新/目录结果软删;
/// Discovered = 来自授权快照来源,仅真正快照刷新成功后处理。
/// </summary>
public enum AuthorizationSource {
Manual = 0,
Discovered = 1
}
}
6 changes: 6 additions & 0 deletions TelegramSearchBot.Common/Model/AI/LlmAgentContracts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ public sealed class AgentChannelConfig {
public int Priority { get; set; }
public string ModelName { get; set; } = string.Empty;
public List<AgentModelCapability> Capabilities { get; set; } = [];

// Phase 2:解析出的 binding 快照(旧二进制/legacy 行全部为 null,走 Provider/Gateway)。
public int? BindingId { get; set; }
public string BindingEndpoint { get; set; } = string.Empty;
public LlmProtocol? BindingProtocol { get; set; }
public LlmAuthProfile? BindingAuthProfile { get; set; }
}

public sealed class AgentExecutionTask {
Expand Down
10 changes: 10 additions & 0 deletions TelegramSearchBot.Common/Model/AI/LlmAuthProfile.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace TelegramSearchBot.Model.AI {
/// <summary>
/// API binding 的认证方式。key 本体仍共享自 LLMChannel.ApiKey。
/// </summary>
public enum LlmAuthProfile {
Bearer = 0,
AnthropicApiKey = 1,
None = 2
}
}
13 changes: 13 additions & 0 deletions TelegramSearchBot.Common/Model/AI/LlmProtocol.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace TelegramSearchBot.Model.AI {
/// <summary>
/// API binding 的线协议。与 LLMProvider(品牌/订阅账号)语义分离,
/// 同一 channel 可通过多个 binding 支持不同协议。
/// </summary>
public enum LlmProtocol {
OpenAIChat = 0,
OpenAIResponses = 1,
AnthropicMessages = 2,
Ollama = 3,
Gemini = 4
}
}
Loading
Loading