import { ProviderV2, EmbeddingModelV2 } from '@ai-sdk/provider';
import { FetchFunction } from '@ai-sdk/provider-utils';
import { z } from 'zod/v4';

type JinaEmbeddingModelId = 'jina-embeddings-v3' | 'jina-embeddings-v2-base-en' | 'jina-embeddings-v2-base-code' | 'jina-clip-v2' | 'jina-clip-v1' | (string & {});
declare const jinaEmbeddingOptions: z.ZodObject<{
    inputType: z.ZodOptional<z.ZodEnum<{
        "text-matching": "text-matching";
        "retrieval.query": "retrieval.query";
        "retrieval.passage": "retrieval.passage";
        separation: "separation";
        classification: "classification";
    }>>;
    outputDimension: z.ZodOptional<z.ZodNumber>;
    lateChunking: z.ZodOptional<z.ZodBoolean>;
    embeddingType: z.ZodOptional<z.ZodEnum<{
        float: "float";
        binary: "binary";
        ubinary: "ubinary";
        base64: "base64";
    }>>;
    normalized: z.ZodOptional<z.ZodBoolean>;
    truncate: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
type JinaEmbeddingOptions = z.infer<typeof jinaEmbeddingOptions>;

type MultimodalEmbeddingInput = {
    text?: string;
    image?: string;
};

interface JinaProvider extends ProviderV2 {
    /**
     * Create a text embedding model for string inputs only.
     * This ensures type safety by only allowing string arrays.
     * @param modelId - The Jina model ID
     * @param settings - Optional model settings
     */
    textEmbeddingModel(modelId: JinaEmbeddingModelId): EmbeddingModelV2<string>;
    /**
     * Create a multimodal embedding model for MultimodalEmbeddingInput only.
     * This ensures type safety by only allowing MultimodalEmbeddingInput arrays.
     * @param modelId - The Jina model ID
     * @param settings - Optional model settings
     */
    multiModalEmbeddingModel(modelId: JinaEmbeddingModelId): EmbeddingModelV2<MultimodalEmbeddingInput>;
}
interface JinaProviderSettings {
    /**
     * Use a different URL prefix for API calls, e.g. to use proxy servers.
     * The default prefix is `https://api.jina.ai/v1`.
     */
    baseURL?: string;
    /**
     * API key that is being send using the `Authorization` header.
     * It defaults to the `JINA_API_KEY` environment variable.
     */
    apiKey?: string;
    /**
     * Custom headers to include in the requests.
     */
    headers?: Record<string, string>;
    /**
     * Custom fetch implementation. You can use it as a middleware to intercept requests,
     * or to provide a custom fetch implementation for e.g. testing.
     */
    fetch?: FetchFunction;
}
declare function createJina(options?: JinaProviderSettings): JinaProvider;
declare const jina: JinaProvider;

export { type JinaEmbeddingOptions, type JinaProvider, type JinaProviderSettings, type MultimodalEmbeddingInput, createJina, jina };
