refactor: remove retired agent provider integration
This commit is contained in:
@@ -17,13 +17,13 @@ import { getAvailableChatTools, normalizeEnabledChatTools } from "./llm/chat-too
|
||||
import { getModelCatalogSnapshot } from "./llm/model-catalog.js";
|
||||
import { buildQuickQuestionMultiplexRequest } from "./llm/quick-question.js";
|
||||
import { openaiClient } from "./llm/providers.js";
|
||||
import { serializeProviderFields, toPrismaProvider } from "./llm/provider-ids.js";
|
||||
import { serializeProviderFields } from "./llm/provider-ids.js";
|
||||
import { exaClient } from "./search/exa.js";
|
||||
import { isFreshSearchCacheHit, normalizeSearchQuery } from "./search-cache.js";
|
||||
import { searchWorkspace } from "./workspace-search.js";
|
||||
import type { ChatAttachment } from "./llm/types.js";
|
||||
import { PROVIDERS, type ChatAttachment } from "./llm/types.js";
|
||||
|
||||
const ProviderSchema = z.enum(["openai", "anthropic", "xai", "gemini", "hermes-agent"]);
|
||||
const ProviderSchema = z.enum(PROVIDERS);
|
||||
const MAX_ADDITIONAL_SYSTEM_PROMPT_CHARS = 12_000;
|
||||
const MAX_FORK_MESSAGE_SNIPPET_CHARS = 48;
|
||||
const EnabledToolsSchema = z.array(z.string().trim().min(1).max(80)).max(20).transform((value) => normalizeEnabledChatTools(value));
|
||||
@@ -335,7 +335,7 @@ function executeActiveAgentAsideStream(chatId: string, body: z.infer<typeof Comp
|
||||
type: "meta",
|
||||
chatId,
|
||||
callId: null,
|
||||
provider: "hermes-agent",
|
||||
provider: "sybil-agent",
|
||||
model: "sybil-agent",
|
||||
agentAside: true,
|
||||
});
|
||||
@@ -815,7 +815,7 @@ function completeChatSubmissionStream(
|
||||
type: "meta",
|
||||
chatId,
|
||||
callId: null,
|
||||
provider: agentAside ? "hermes-agent" : body.provider,
|
||||
provider: agentAside ? "sybil-agent" : body.provider,
|
||||
model: agentAside ? "sybil-agent" : body.model,
|
||||
...(agentAside ? { agentAside: true } : {}),
|
||||
});
|
||||
@@ -1129,9 +1129,9 @@ export async function registerRoutes(app: FastifyInstance, options: { agentInlin
|
||||
const chat = await prisma.chat.create({
|
||||
data: {
|
||||
title: body.title,
|
||||
initiatedProvider: body.provider ? (toPrismaProvider(body.provider) as any) : undefined,
|
||||
initiatedProvider: body.provider,
|
||||
initiatedModel: body.model,
|
||||
lastUsedProvider: body.provider ? (toPrismaProvider(body.provider) as any) : undefined,
|
||||
lastUsedProvider: body.provider,
|
||||
lastUsedModel: body.model,
|
||||
additionalSystemPrompt: normalizeAdditionalSystemPrompt(body.additionalSystemPrompt),
|
||||
enabledTools: body.enabledTools as any,
|
||||
@@ -1761,7 +1761,7 @@ export async function registerRoutes(app: FastifyInstance, options: { agentInlin
|
||||
const completedAgentAside = Boolean((completed.metadata as Record<string, unknown> | null)?.agentAside === true);
|
||||
return {
|
||||
chatId: body.chatId,
|
||||
provider: completedAgentAside ? "hermes-agent" : body.provider,
|
||||
provider: completedAgentAside ? "sybil-agent" : body.provider,
|
||||
model: completedAgentAside ? "sybil-agent" : body.model,
|
||||
message: {
|
||||
role: "assistant",
|
||||
@@ -1778,7 +1778,7 @@ export async function registerRoutes(app: FastifyInstance, options: { agentInlin
|
||||
await storeAgentAsideReply(body.chatId, content, body.clientRequestId);
|
||||
return {
|
||||
chatId: body.chatId,
|
||||
provider: "hermes-agent",
|
||||
provider: "sybil-agent",
|
||||
model: "sybil-agent",
|
||||
message: { role: "assistant", content, name: "Sybil Agent", agentAside: true },
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user