import { extractToolCallsFromReasoningTextWithNative } from '../../router/virtual-router/engine-selection/native-shared-conversion-semantics.js';
export function extractToolCallsFromReasoningText(text, options) {
    if (typeof text !== 'string' || !text.trim()) {
        return { cleanedText: typeof text === 'string' ? text : '', toolCalls: [] };
    }
    const idPrefix = options?.idPrefix ?? 'reasoning';
    const output = extractToolCallsFromReasoningTextWithNative(text, idPrefix);
    return {
        cleanedText: output.cleanedText,
        toolCalls: output.toolCalls
    };
}
