import { GoogleAuthOptions } from 'google-auth-library';
import { ProviderV3, LanguageModelV3 } from '@ai-sdk/provider';
import { Resolvable, FetchFunction } from '@ai-sdk/provider-utils';

type GoogleVertexXaiModelId = 'xai/grok-4.20-reasoning' | 'xai/grok-4.20-non-reasoning' | 'xai/grok-4.1-fast-reasoning' | 'xai/grok-4.1-fast-non-reasoning' | (string & {});

interface GoogleVertexXaiProvider extends ProviderV3 {
    /**
     * Creates a model for text generation.
     */
    (modelId: GoogleVertexXaiModelId): LanguageModelV3;
    /**
     * Creates a model for text generation.
     */
    languageModel(modelId: GoogleVertexXaiModelId): LanguageModelV3;
    /**
     * Creates a chat model for text generation.
     */
    chatModel(modelId: GoogleVertexXaiModelId): LanguageModelV3;
    /**
     * @deprecated Use `embeddingModel` instead.
     */
    textEmbeddingModel(modelId: string): never;
}
interface GoogleVertexXaiProviderSettings$1 {
    /**
     * Google Cloud project ID. Defaults to the value of the `GOOGLE_VERTEX_PROJECT` environment variable.
     */
    project?: string;
    /**
     * Google Cloud location/region. Defaults to the value of the `GOOGLE_VERTEX_LOCATION` environment variable.
     * Use 'global' for the global endpoint.
     */
    location?: string;
    /**
     * Base URL for the API calls. If not provided, will be constructed from project and location.
     */
    baseURL?: string;
    /**
     * Headers to use for requests. Can be:
     * - A headers object
     * - A Promise that resolves to a headers object
     * - A function that returns a headers object
     * - A function that returns a Promise of a headers object
     */
    headers?: Resolvable<Record<string, string | undefined>>;
    /**
     * 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;
}

interface GoogleVertexXaiProviderSettings extends GoogleVertexXaiProviderSettings$1 {
    /**
     * Optional. The Authentication options provided by google-auth-library.
     * Complete list of authentication options is documented in the
     * GoogleAuthOptions interface:
     * https://github.com/googleapis/google-auth-library-nodejs/blob/main/src/auth/googleauth.ts.
     */
    googleAuthOptions?: GoogleAuthOptions;
}
/**
 * Create a Google Vertex AI xAI provider instance for Node.js.
 * Uses the OpenAI-compatible Chat Completions API for Grok partner models.
 * Automatically handles Google Cloud authentication.
 *
 * @see https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/grok
 */
declare function createGoogleVertexXai(options?: GoogleVertexXaiProviderSettings): GoogleVertexXaiProvider;
/**
 * Default Google Vertex AI xAI provider instance for Node.js.
 */
declare const googleVertexXai: GoogleVertexXaiProvider;

export { type GoogleVertexXaiModelId, type GoogleVertexXaiProvider, type GoogleVertexXaiProviderSettings, createGoogleVertexXai, googleVertexXai };
