mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-12-01 18:07:00 +01:00
Preserve the reviewed candidate source and mainline provider behavior. Co-Authored-By: Paperclip <noreply@paperclip.ing>
14 lines
571 B
TypeScript
14 lines
571 B
TypeScript
import { aiConnectionBindingSchema, type Agent } from "@paperclipai/shared";
|
|
|
|
/** Task overrides must discover models through the assignee's saved connection. */
|
|
export function copilotTaskModelCatalogOptions(agent: Agent | null | undefined) {
|
|
if (agent?.adapterType !== "paperclip_runner"
|
|
|| agent.adapterConfig.provider !== "acpx"
|
|
|| agent.adapterConfig.acpxAgent !== "copilot") return undefined;
|
|
return {
|
|
acpxAgent: "copilot",
|
|
agentId: agent.id,
|
|
aiConnection: aiConnectionBindingSchema.safeParse(agent.runtimeConfig?.aiConnection).data,
|
|
};
|
|
}
|