feat: use managed model capabilities for reasoning and image input

This commit is contained in:
2026-09-12 21:37:18 +08:00
parent e7701d1f2c
commit 26cbb29aa9
29 changed files with 652 additions and 271 deletions

View File

@@ -1,4 +1,5 @@
import type { ModelSummary, ProviderAccount } from '../../shared/providers/types';
import { buildManagedModelRequest } from '../../../shared/managed-model-capabilities';
import { readCodingProjectConfigV2 } from '../../coding-projects/project-config';
import type { CodingProjectStore } from '../../coding-projects/project-store';
import type { PublicUsage } from '../contracts';
@@ -224,6 +225,9 @@ export function createPiManagedSubagentChildOpener(
: {}),
});
const extension = await options.extensionHost.registerWorker({
...(selection.managedCapability ? { managedModelRequest: buildManagedModelRequest(
agent.model.modelId, agent.model.reasoningChoice ?? { mode: 'default' }, selection.managedCapability,
) } : {}),
conversationId: input.conversationId,
generation: input.workerGeneration,
projectId: input.projectId,