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

@@ -109,6 +109,8 @@ function normalizeResponsibility(value: unknown): ProjectAgentResponsibility {
};
}
import { parseManagedReasoningChoice } from '../../shared/managed-model-capabilities';
export function normalizeProductModelRef(value: unknown): ProductModelRef {
if (!value || typeof value !== 'object' || Array.isArray(value)) {
throw new Error('Product model must be an object');
@@ -123,6 +125,9 @@ export function normalizeProductModelRef(value: unknown): ProductModelRef {
accountId,
modelId,
thinkingLevel: record.thinkingLevel as ConversationThinkingLevel,
...(record.reasoningChoice !== undefined ? {
reasoningChoice: parseManagedReasoningChoice(record.reasoningChoice) ?? (() => { throw new Error('Invalid reasoning choice'); })(),
} : {}),
};
}