import type { StreamTextResult } from "../types/index.js"; import type { LanguageModel } from "../types/index.js"; import type { streamText } from "../utils/generation.js"; /** * Extract the model identifier from a LanguageModel value. * * `LanguageModel` in AI SDK v6 is `string | LanguageModelV2 | LanguageModelV3`. * When it's a string it IS the model ID; when it's an object, `.modelId` holds it. * * @param model - The LanguageModel value (string or object). * @param fallback - Value returned when the model ID cannot be determined. */ export declare function getModelId(model: LanguageModel, fallback?: string): string; /** * Adapt an AI SDK `StreamTextResult` (generic, parameterised by TOOLS & OUTPUT) * to the simpler NeuroLink `StreamTextResult` expected by the analytics collector. * * The AI SDK result is a structural superset of our local type — every field our * analytics code reads (`textStream`, `text`, `usage`, `response`, `finishReason`, * `toolResults`, `toolCalls`) exists on the SDK result with compatible types. * This function performs the structural down-cast without `as any`. */ export declare function toAnalyticsStreamResult(result: ReturnType): StreamTextResult;