import { parseGatewayStyleModelId } from "../llm/model-id.js";
import { resolveProviderOpenAiOverrides, } from "../llm/provider-profile.js";
export function resolveModelAttemptOpenAiOverrides(attempt, runtime) {
    if (attempt.transport !== "native" || !attempt.llmModelId)
        return {};
    const provider = parseGatewayStyleModelId(attempt.llmModelId).provider;
    return resolveProviderOpenAiOverrides({
        provider,
        runtime,
        baseUrlOverride: attempt.openaiBaseUrlOverride,
    });
}
export function applyProviderRuntimeToModelAttempt(attempt, runtime) {
    return {
        ...attempt,
        ...resolveModelAttemptOpenAiOverrides(attempt, runtime),
    };
}
//# sourceMappingURL=provider-attempt.js.map