diff --git a/src/commands/openai-codex-oauth.test.ts b/src/commands/openai-codex-oauth.test.ts index aa2f82b58a..b3775036b1 100644 --- a/src/commands/openai-codex-oauth.test.ts +++ b/src/commands/openai-codex-oauth.test.ts @@ -81,6 +81,9 @@ describe("loginOpenAICodexOAuth", () => { expect(result).toEqual(creds); expect(mocks.loginOpenAICodex).toHaveBeenCalledOnce(); + expect(mocks.loginOpenAICodex).toHaveBeenCalledWith( + expect.objectContaining({ originator: "openclaw" }), + ); expect(spin.stop).toHaveBeenCalledWith("OpenAI OAuth complete"); expect(runtime.error).not.toHaveBeenCalled(); }); diff --git a/src/plugins/provider-openai-codex-oauth.ts b/src/plugins/provider-openai-codex-oauth.ts index 9716a4249b..e46452addd 100644 --- a/src/plugins/provider-openai-codex-oauth.ts +++ b/src/plugins/provider-openai-codex-oauth.ts @@ -9,6 +9,7 @@ import { } from "./provider-openai-codex-oauth-tls.js"; const manualInputPromptMessage = "Paste the authorization code (or full redirect URL):"; +const openAICodexOAuthOriginator = "openclaw"; export async function loginOpenAICodexOAuth(params: { prompter: WizardPrompter; @@ -61,6 +62,7 @@ export async function loginOpenAICodexOAuth(params: { const creds = await loginOpenAICodex({ onAuth: baseOnAuth, onPrompt, + originator: openAICodexOAuthOriginator, onManualCodeInput: isRemote ? async () => await onPrompt({