diff --git a/src/cli/config-manager.test.ts b/src/cli/config-manager.test.ts index 82c81cf..72d9419 100644 --- a/src/cli/config-manager.test.ts +++ b/src/cli/config-manager.test.ts @@ -12,10 +12,8 @@ describe("config-manager ANTIGRAVITY_PROVIDER_CONFIG", () => { const required = [ "gemini-3-pro-high", - "gemini-3-pro-medium", "gemini-3-pro-low", "gemini-3-flash", - "gemini-3-flash-lite", ] for (const key of required) { diff --git a/src/cli/config-manager.ts b/src/cli/config-manager.ts index df74908..692c6c2 100644 --- a/src/cli/config-manager.ts +++ b/src/cli/config-manager.ts @@ -55,8 +55,6 @@ function getOmoConfig(): string { return getConfigContext().paths.omoConfig } -const CHATGPT_HOTFIX_REPO = "code-yeongyu/opencode-openai-codex-auth#fix/orphaned-function-call-output-with-tools" - const BUN_INSTALL_TIMEOUT_SECONDS = 60 const BUN_INSTALL_TIMEOUT_MS = BUN_INSTALL_TIMEOUT_SECONDS * 1000 @@ -441,48 +439,6 @@ export async function addAuthPlugins(config: InstallConfig): Promise = {} - if (existsSync(packageJsonPath)) { - try { - const stat = statSync(packageJsonPath) - const content = readFileSync(packageJsonPath, "utf-8") - - if (stat.size > 0 && !isEmptyOrWhitespace(content)) { - packageJson = JSON.parse(content) - if (typeof packageJson !== "object" || packageJson === null || Array.isArray(packageJson)) { - packageJson = {} - } - } - } catch (parseErr) { - if (parseErr instanceof SyntaxError) { - packageJson = {} - } else { - throw parseErr - } - } - } - - const deps = (packageJson.dependencies ?? {}) as Record - deps["opencode-openai-codex-auth"] = CHATGPT_HOTFIX_REPO - packageJson.dependencies = deps - - writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2) + "\n") - return { success: true, configPath: packageJsonPath } - } catch (err) { - return { success: false, configPath: packageJsonPath, error: formatErrorWithSuggestion(err, "setup ChatGPT hotfix in package.json") } - } -} - export interface BunInstallResult { success: boolean timedOut?: boolean @@ -544,8 +500,6 @@ export async function runBunInstallWithDetails(): Promise { export const ANTIGRAVITY_PROVIDER_CONFIG = { google: { name: "Google", - // NOTE: opencode-antigravity-auth expects full model specs (name/limit/modalities). - // If these are incomplete, models may appear but fail at runtime (e.g. 404). models: { "gemini-3-pro-high": { name: "Gemini 3 Pro High (Antigravity)", @@ -554,13 +508,6 @@ export const ANTIGRAVITY_PROVIDER_CONFIG = { limit: { context: 1048576, output: 65535 }, modalities: { input: ["text", "image", "pdf"], output: ["text"] }, }, - "gemini-3-pro-medium": { - name: "Gemini 3 Pro Medium (Antigravity)", - thinking: true, - attachment: true, - limit: { context: 1048576, output: 65535 }, - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - }, "gemini-3-pro-low": { name: "Gemini 3 Pro Low (Antigravity)", thinking: true, @@ -574,12 +521,6 @@ export const ANTIGRAVITY_PROVIDER_CONFIG = { limit: { context: 1048576, output: 65536 }, modalities: { input: ["text", "image", "pdf"], output: ["text"] }, }, - "gemini-3-flash-lite": { - name: "Gemini 3 Flash Lite (Antigravity)", - attachment: true, - limit: { context: 1048576, output: 65536 }, - modalities: { input: ["text", "image", "pdf"], output: ["text"] }, - }, }, }, } @@ -587,12 +528,48 @@ export const ANTIGRAVITY_PROVIDER_CONFIG = { const CODEX_PROVIDER_CONFIG = { openai: { name: "OpenAI", - api: "codex", + options: { + reasoningEffort: "medium", + reasoningSummary: "auto", + textVerbosity: "medium", + include: ["reasoning.encrypted_content"], + store: false, + }, models: { - "gpt-5.2": { name: "GPT-5.2" }, - "o3": { name: "o3", thinking: true }, - "o4-mini": { name: "o4-mini", thinking: true }, - "codex-1": { name: "Codex-1" }, + "gpt-5.2": { + name: "GPT 5.2 (OAuth)", + limit: { context: 272000, output: 128000 }, + modalities: { input: ["text", "image"], output: ["text"] }, + variants: { + none: { reasoningEffort: "none", reasoningSummary: "auto", textVerbosity: "medium" }, + low: { reasoningEffort: "low", reasoningSummary: "auto", textVerbosity: "medium" }, + medium: { reasoningEffort: "medium", reasoningSummary: "auto", textVerbosity: "medium" }, + high: { reasoningEffort: "high", reasoningSummary: "detailed", textVerbosity: "medium" }, + xhigh: { reasoningEffort: "xhigh", reasoningSummary: "detailed", textVerbosity: "medium" }, + }, + }, + "gpt-5.2-codex": { + name: "GPT 5.2 Codex (OAuth)", + limit: { context: 272000, output: 128000 }, + modalities: { input: ["text", "image"], output: ["text"] }, + variants: { + low: { reasoningEffort: "low", reasoningSummary: "auto", textVerbosity: "medium" }, + medium: { reasoningEffort: "medium", reasoningSummary: "auto", textVerbosity: "medium" }, + high: { reasoningEffort: "high", reasoningSummary: "detailed", textVerbosity: "medium" }, + xhigh: { reasoningEffort: "xhigh", reasoningSummary: "detailed", textVerbosity: "medium" }, + }, + }, + "gpt-5.1-codex-max": { + name: "GPT 5.1 Codex Max (OAuth)", + limit: { context: 272000, output: 128000 }, + modalities: { input: ["text", "image"], output: ["text"] }, + variants: { + low: { reasoningEffort: "low", reasoningSummary: "detailed", textVerbosity: "medium" }, + medium: { reasoningEffort: "medium", reasoningSummary: "detailed", textVerbosity: "medium" }, + high: { reasoningEffort: "high", reasoningSummary: "detailed", textVerbosity: "medium" }, + xhigh: { reasoningEffort: "xhigh", reasoningSummary: "detailed", textVerbosity: "medium" }, + }, + }, }, }, } diff --git a/src/cli/install.ts b/src/cli/install.ts index 5a308f2..abb6fe6 100644 --- a/src/cli/install.ts +++ b/src/cli/install.ts @@ -7,8 +7,6 @@ import { isOpenCodeInstalled, getOpenCodeVersion, addAuthPlugins, - setupChatGPTHotfix, - runBunInstall, addProviderConfig, detectCurrentConfig, } from "./config-manager" @@ -279,26 +277,6 @@ async function runNonTuiInstall(args: InstallArgs): Promise { step += 2 } - if (config.hasChatGPT) { - printStep(step++, totalSteps, "Setting up ChatGPT hotfix...") - const hotfixResult = setupChatGPTHotfix() - if (!hotfixResult.success) { - printError(`Failed: ${hotfixResult.error}`) - return 1 - } - printSuccess(`Hotfix configured ${SYMBOLS.arrow} ${color.dim(hotfixResult.configPath)}`) - - printInfo("Installing dependencies with bun...") - const bunSuccess = await runBunInstall() - if (bunSuccess) { - printSuccess("Dependencies installed") - } else { - printWarning("bun install failed - run manually: cd ~/.config/opencode && bun i") - } - } else { - step++ - } - printStep(step++, totalSteps, "Writing oh-my-opencode configuration...") const omoResult = writeOmoConfig(config) if (!omoResult.success) { @@ -410,25 +388,6 @@ export async function install(args: InstallArgs): Promise { s.stop(`Provider config added to ${color.cyan(providerResult.configPath)}`) } - if (config.hasChatGPT) { - s.start("Setting up ChatGPT hotfix") - const hotfixResult = setupChatGPTHotfix() - if (!hotfixResult.success) { - s.stop(`Failed to setup hotfix: ${hotfixResult.error}`) - p.outro(color.red("Installation failed.")) - return 1 - } - s.stop(`Hotfix configured in ${color.cyan(hotfixResult.configPath)}`) - - s.start("Installing dependencies with bun") - const bunSuccess = await runBunInstall() - if (bunSuccess) { - s.stop("Dependencies installed") - } else { - s.stop(color.yellow("bun install failed - run manually: cd ~/.config/opencode && bun i")) - } - } - s.start("Writing oh-my-opencode configuration") const omoResult = writeOmoConfig(config) if (!omoResult.success) {