From 29e9ada599b3b0adfaeb03f8d381a6f54955218c Mon Sep 17 00:00:00 2001 From: jnjpng Date: Thu, 15 Jan 2026 15:49:01 -0800 Subject: [PATCH] chore: naming to chatgpt oauth instead of codex oauth (#551) --- src/agent/client.ts | 2 +- src/agent/modify.ts | 2 +- src/auth/openai-oauth.ts | 2 +- src/cli/App.tsx | 2 +- src/cli/commands/connect.ts | 20 ++++++++++---------- src/providers/openai-codex-provider.ts | 14 +++++++------- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/agent/client.ts b/src/agent/client.ts index 9f29f76..bd5e476 100644 --- a/src/agent/client.ts +++ b/src/agent/client.ts @@ -75,7 +75,7 @@ export async function getClient() { process.exit(1); } - // Note: OpenAI Codex OAuth token refresh is handled by the Letta backend + // Note: ChatGPT OAuth token refresh is handled by the Letta backend // when using the chatgpt_oauth provider type return new Letta({ diff --git a/src/agent/modify.ts b/src/agent/modify.ts index ce6a57a..113d6b0 100644 --- a/src/agent/modify.ts +++ b/src/agent/modify.ts @@ -25,7 +25,7 @@ function buildModelSettings( modelHandle: string, updateArgs?: Record, ): ModelSettings { - // Include our custom OpenAI Codex OAuth provider (chatgpt-plus-pro) + // Include our custom ChatGPT OAuth provider (chatgpt-plus-pro) const isOpenAI = modelHandle.startsWith("openai/") || modelHandle.startsWith(`${OPENAI_CODEX_PROVIDER_NAME}/`); diff --git a/src/auth/openai-oauth.ts b/src/auth/openai-oauth.ts index 3db539e..867d9db 100644 --- a/src/auth/openai-oauth.ts +++ b/src/auth/openai-oauth.ts @@ -1,5 +1,5 @@ /** - * OAuth 2.0 utilities for OpenAI Codex authentication + * OAuth 2.0 utilities for ChatGPT OAuth authentication * Uses Authorization Code Flow with PKCE and local callback server * Compatible with Codex CLI authentication flow */ diff --git a/src/cli/App.tsx b/src/cli/App.tsx index 803014f..e39afa2 100644 --- a/src/cli/App.tsx +++ b/src/cli/App.tsx @@ -3561,7 +3561,7 @@ export default function App({ // Special handling for /connect command - OAuth connection if (msg.trim().startsWith("/connect")) { // Handle all /connect commands through the unified handler - // For codex: uses local OAuth server (no dialog needed) + // For codex: uses local ChatGPT OAuth server (no dialog needed) // For zai: requires API key as argument const { handleConnect } = await import("./commands/connect"); await handleConnect( diff --git a/src/cli/commands/connect.ts b/src/cli/commands/connect.ts index ed996f0..573a2e4 100644 --- a/src/cli/commands/connect.ts +++ b/src/cli/commands/connect.ts @@ -138,7 +138,7 @@ export async function handleConnect( } /** - * Handle /connect codex - OpenAI Codex OAuth with local server + * Handle /connect codex - ChatGPT OAuth with local server */ async function handleConnectCodex( ctx: ConnectCommandContext, @@ -151,7 +151,7 @@ async function handleConnectCodex( ctx.buffersRef, ctx.refreshDerived, msg, - "Already connected to OpenAI Codex via OAuth.\n\nUse /disconnect codex to remove the current connection first.", + "Already connected to ChatGPT via OAuth.\n\nUse /disconnect codex to remove the current connection first.", false, ); return; @@ -179,7 +179,7 @@ async function handleConnectCodex( ctx.refreshDerived, cmdId, msg, - `\u2717 OpenAI Codex OAuth requires a Pro or Enterprise plan\n\n` + + `\u2717 ChatGPT OAuth requires a Pro or Enterprise plan\n\n` + `This feature is only available for Letta Pro or Enterprise customers.\n` + `Current plan: ${eligibility.billing_tier}\n\n` + `To upgrade your plan, visit:\n\n` + @@ -304,7 +304,7 @@ async function handleConnectCodex( ctx.refreshDerived, cmdId, msg, - "Creating OpenAI Codex provider...", + "Creating ChatGPT OAuth provider...", true, "running", ); @@ -326,7 +326,7 @@ async function handleConnectCodex( ctx.refreshDerived, cmdId, msg, - `\u2713 Successfully connected to OpenAI Codex!\n\n` + + `\u2713 Successfully connected to ChatGPT!\n\n` + `Provider '${OPENAI_CODEX_PROVIDER_NAME}' created/updated in Letta.\n` + `Your ChatGPT Plus/Pro subscription is now linked.`, true, @@ -348,7 +348,7 @@ async function handleConnectCodex( let displayMessage: string; if (errorMessage === "PLAN_UPGRADE_REQUIRED") { displayMessage = - `\u2717 OpenAI Codex OAuth requires a Pro or Enterprise plan\n\n` + + `\u2717 ChatGPT OAuth requires a Pro or Enterprise plan\n\n` + `This feature is only available for Letta Pro or Enterprise customers.\n` + `To upgrade your plan, visit:\n\n` + ` https://app.letta.com/settings/organization/usage\n\n` + @@ -437,7 +437,7 @@ async function handleDisconnectCodex( ctx.buffersRef, ctx.refreshDerived, msg, - "Not currently connected to OpenAI Codex via OAuth.\n\nUse /connect codex to authenticate.", + "Not currently connected to ChatGPT via OAuth.\n\nUse /connect codex to authenticate.", false, ); return; @@ -448,7 +448,7 @@ async function handleDisconnectCodex( ctx.buffersRef, ctx.refreshDerived, msg, - "Disconnecting from OpenAI Codex OAuth...", + "Disconnecting from ChatGPT OAuth...", true, "running", ); @@ -464,7 +464,7 @@ async function handleDisconnectCodex( ctx.refreshDerived, cmdId, msg, - `\u2713 Disconnected from OpenAI Codex OAuth.\n\n` + + `\u2713 Disconnected from ChatGPT OAuth.\n\n` + `Provider '${OPENAI_CODEX_PROVIDER_NAME}' removed from Letta.`, true, "finished", @@ -475,7 +475,7 @@ async function handleDisconnectCodex( ctx.refreshDerived, cmdId, msg, - `\u2717 Failed to disconnect from OpenAI Codex: ${getErrorMessage(error)}`, + `\u2717 Failed to disconnect from ChatGPT: ${getErrorMessage(error)}`, false, "finished", ); diff --git a/src/providers/openai-codex-provider.ts b/src/providers/openai-codex-provider.ts index 7a839f4..42fadb3 100644 --- a/src/providers/openai-codex-provider.ts +++ b/src/providers/openai-codex-provider.ts @@ -1,5 +1,5 @@ /** - * Direct API calls to Letta for managing OpenAI Codex provider + * Direct API calls to Letta for managing ChatGPT OAuth provider * Uses the chatgpt_oauth provider type - backend handles request transformation * (transforms OpenAI API format → ChatGPT backend API format) */ @@ -7,7 +7,7 @@ import { LETTA_CLOUD_API_URL } from "../auth/oauth"; import { settingsManager } from "../settings-manager"; -// Provider name constant for letta-code's OpenAI Codex OAuth provider +// Provider name constant for letta-code's ChatGPT OAuth provider export const OPENAI_CODEX_PROVIDER_NAME = "chatgpt-plus-pro"; // Provider type for ChatGPT OAuth (backend handles transformation) @@ -190,7 +190,7 @@ export async function updateOpenAICodexProvider( } /** - * Delete the OpenAI Codex provider + * Delete the ChatGPT OAuth provider */ export async function deleteOpenAICodexProvider( providerId: string, @@ -224,7 +224,7 @@ export async function createOrUpdateOpenAICodexProvider( } /** - * Remove the OpenAI Codex provider (called on /disconnect) + * Remove the ChatGPT OAuth provider (called on /disconnect) */ export async function removeOpenAICodexProvider(): Promise { const existing = await getOpenAICodexProvider(); @@ -234,7 +234,7 @@ export async function removeOpenAICodexProvider(): Promise { } /** - * Check if user is eligible for OpenAI Codex OAuth + * Check if user is eligible for ChatGPT OAuth * Requires Pro or Enterprise billing tier */ export async function checkOpenAICodexEligibility(): Promise { @@ -257,12 +257,12 @@ export async function checkOpenAICodexEligibility(): Promise