import { r as ensureGlobalUndiciEnvProxyDispatcher } from "../../undici-global-dispatcher-BmOp0aeN.js";
import { i as refreshOpenAICodexToken$1, t as getOAuthApiKey$1 } from "../../oauth-C932bMsh.js";
import "../../runtime-env-DwOXvHiR.js";
//#region extensions/openai/openai-codex-provider.runtime.ts
function createOpenAICodexProviderRuntime(deps) {
	return {
		async getOAuthApiKey(...args) {
			deps.ensureGlobalUndiciEnvProxyDispatcher();
			return await deps.getOAuthApiKey(...args);
		},
		async refreshOpenAICodexToken(...args) {
			deps.ensureGlobalUndiciEnvProxyDispatcher();
			return await deps.refreshOpenAICodexToken(...args);
		}
	};
}
const runtime = createOpenAICodexProviderRuntime({
	ensureGlobalUndiciEnvProxyDispatcher,
	getOAuthApiKey: getOAuthApiKey$1,
	refreshOpenAICodexToken: refreshOpenAICodexToken$1
});
async function getOAuthApiKey(...args) {
	return await runtime.getOAuthApiKey(...args);
}
async function refreshOpenAICodexToken(...args) {
	return await runtime.refreshOpenAICodexToken(...args);
}
//#endregion
export { createOpenAICodexProviderRuntime, getOAuthApiKey, refreshOpenAICodexToken };
