feat(wechat): add admin-pluggable LLM intent router separate from H5.
Memind CI / Test, build, and release guards (push) Failing after 8s
Memind CI / Test, build, and release guards (push) Failing after 8s
Give WeChat MP its own chat.general→page.generate LLM refinement layer with memindadm toggles, shadow mode, and canary openids so service account routing stays independent of the H5 chatIntentRouter. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -738,6 +738,48 @@ export async function resumeWechatDigest(id: string) {
|
||||
});
|
||||
}
|
||||
|
||||
export type WechatIntentRouterAdminConfig = {
|
||||
enabled: boolean;
|
||||
shadowMode: boolean;
|
||||
modelProviderKeyId: string | null;
|
||||
model: string | null;
|
||||
minConfidence: number;
|
||||
timeoutMs: number;
|
||||
canaryOpenids: string[];
|
||||
updatedAt?: number | null;
|
||||
updatedBy?: string | null;
|
||||
};
|
||||
|
||||
export type WechatIntentRouterConfigState = {
|
||||
config: WechatIntentRouterAdminConfig;
|
||||
};
|
||||
|
||||
export type WechatIntentRouterRuntimeState = {
|
||||
source: string;
|
||||
updatedAt: number | null;
|
||||
updatedBy: string | null;
|
||||
fingerprint?: string;
|
||||
overrides: Record<string, string>;
|
||||
config: WechatIntentRouterAdminConfig;
|
||||
};
|
||||
|
||||
export async function fetchWechatIntentRouterConfig() {
|
||||
return adminFetch<WechatIntentRouterConfigState>('/admin-api/wechat/intent-router/config');
|
||||
}
|
||||
|
||||
export async function patchWechatIntentRouterConfig(
|
||||
patch: Partial<Omit<WechatIntentRouterAdminConfig, 'updatedAt' | 'updatedBy'>>,
|
||||
) {
|
||||
return adminFetch<WechatIntentRouterConfigState>('/admin-api/wechat/intent-router/config', {
|
||||
method: 'PATCH',
|
||||
body: JSON.stringify(patch),
|
||||
});
|
||||
}
|
||||
|
||||
export async function fetchWechatIntentRouterRuntime() {
|
||||
return adminFetch<WechatIntentRouterRuntimeState>('/admin-api/wechat/intent-router/runtime');
|
||||
}
|
||||
|
||||
// ─── Agent Code Run ───────────────────────────────────────────────────────────
|
||||
|
||||
export type AgentCodeRunConfigShape = {
|
||||
|
||||
Reference in New Issue
Block a user