import type { CancellationToken } from 'vscode';
import { IChatMLFetcher } from '../../../platform/chat/common/chatMLFetcher';
import { ChatResponse } from '../../../platform/chat/common/commonTypes';
import { IConfigurationService } from '../../../platform/configuration/common/configurationService';
import { IDomainService } from '../../../platform/endpoint/common/domainService';
import { IChatModelInformation } from '../../../platform/endpoint/common/endpointProvider';
import { ChatEndpoint } from '../../../platform/endpoint/node/chatEndpoint';
import { ILogService } from '../../../platform/log/common/logService';
import { IChatEndpoint, ICreateEndpointBodyOptions, IEndpointBody, IMakeChatRequestOptions } from '../../../platform/networking/common/networking';
import { IChatWebSocketManager } from '../../../platform/networking/node/chatWebSocketManager';
import { IExperimentationService } from '../../../platform/telemetry/common/nullExperimentationService';
import { ITokenizerProvider } from '../../../platform/tokenizer/node/tokenizer';
import { IInstantiationService } from '../../../util/vs/platform/instantiation/common/instantiation';
/**
 * Checks to see if a given endpoint is a BYOK model.
 * @param endpoint The endpoint to check if it's a BYOK model
 * @returns 1 if client side byok, 2 if server side byok, -1 if not a byok model
 */
export declare function isBYOKModel(endpoint: IChatEndpoint | undefined): number;
export declare class OpenAIEndpoint extends ChatEndpoint {
    protected readonly _apiKey: string;
    protected readonly _modelUrl: string;
    protected instantiationService: IInstantiationService;
    protected logService: ILogService;
    private static readonly _reservedHeaders;
    private static readonly _validHeaderNamePattern;
    private static readonly _maxHeaderNameLength;
    private static readonly _maxHeaderValueLength;
    private static readonly _maxCustomHeaderCount;
    protected readonly _customHeaders: Record<string, string>;
    constructor(_modelMetadata: IChatModelInformation, _apiKey: string, _modelUrl: string, domainService: IDomainService, chatMLFetcher: IChatMLFetcher, tokenizerProvider: ITokenizerProvider, instantiationService: IInstantiationService, configurationService: IConfigurationService, expService: IExperimentationService, chatWebSocketService: IChatWebSocketManager, logService: ILogService);
    private _sanitizeCustomHeaders;
    private _sanitizeHeaderValue;
    createRequestBody(options: ICreateEndpointBodyOptions): IEndpointBody;
    /**
     * Forwards the per-request reasoning effort to the model body in the shape the endpoint expects.
     * Default shape mirrors the API path (`Responses` \u2192 nested `reasoning.effort`, `Chat Completions` \u2192 top-level `reasoning_effort`).
     * `IChatModelInformation.reasoningEffortFormat` overrides the default so users hosting OpenAI-compatible servers
     * with diverging conventions (e.g. nested `reasoning.effort` on `/chat/completions`) can opt in deterministically.
     */
    private _applyReasoningEffort;
    interceptBody(body: IEndpointBody | undefined): void;
    get urlOrRequestMetadata(): string;
    getExtraHeaders(): Record<string, string>;
    cloneWithTokenOverride(modelMaxPromptTokens: number): IChatEndpoint;
    makeChatRequest2(options: IMakeChatRequestOptions, token: CancellationToken): Promise<ChatResponse>;
}
//# sourceMappingURL=openAIEndpoint.d.ts.map