claude-code-openai 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +153 -28
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -132036,6 +132036,9 @@ var init_configs = __esm(() => {
132036
132036
  function getAPIProvider() {
132037
132037
  return isEnvTruthy(process.env.CLAUDE_CODE_USE_OPENAI) ? "openai" : isEnvTruthy(process.env.CLAUDE_CODE_USE_BEDROCK) ? "bedrock" : isEnvTruthy(process.env.CLAUDE_CODE_USE_VERTEX) ? "vertex" : isEnvTruthy(process.env.CLAUDE_CODE_USE_FOUNDRY) ? "foundry" : "firstParty";
132038
132038
  }
132039
+ function isOpenAIProvider() {
132040
+ return getAPIProvider() === "openai";
132041
+ }
132039
132042
  function getAPIProviderForStatsig() {
132040
132043
  return getAPIProvider();
132041
132044
  }
@@ -137176,7 +137179,7 @@ function formatPrice(price) {
137176
137179
  function formatModelPricing(costs) {
137177
137180
  return `${formatPrice(costs.inputTokens)}/${formatPrice(costs.outputTokens)} per Mtok`;
137178
137181
  }
137179
- var COST_TIER_3_15, COST_TIER_15_75, COST_TIER_5_25, COST_TIER_30_150, COST_HAIKU_35, COST_HAIKU_45, DEFAULT_UNKNOWN_MODEL_COST, MODEL_COSTS;
137182
+ var COST_TIER_3_15, COST_TIER_15_75, COST_TIER_5_25, COST_TIER_30_150, COST_HAIKU_35, COST_HAIKU_45, COST_GPT_54, COST_GPT_54_MINI, COST_GPT_41_MINI, COST_GPT_41, DEFAULT_UNKNOWN_MODEL_COST, MODEL_COSTS;
137180
137183
  var init_modelCost = __esm(() => {
137181
137184
  init_analytics();
137182
137185
  init_state();
@@ -137225,6 +137228,34 @@ var init_modelCost = __esm(() => {
137225
137228
  promptCacheReadTokens: 0.1,
137226
137229
  webSearchRequests: 0.01
137227
137230
  };
137231
+ COST_GPT_54 = {
137232
+ inputTokens: 2.5,
137233
+ outputTokens: 15,
137234
+ promptCacheWriteTokens: 2.5,
137235
+ promptCacheReadTokens: 0.625,
137236
+ webSearchRequests: 0.025
137237
+ };
137238
+ COST_GPT_54_MINI = {
137239
+ inputTokens: 0.4,
137240
+ outputTokens: 1.6,
137241
+ promptCacheWriteTokens: 0.4,
137242
+ promptCacheReadTokens: 0.1,
137243
+ webSearchRequests: 0.025
137244
+ };
137245
+ COST_GPT_41_MINI = {
137246
+ inputTokens: 0.4,
137247
+ outputTokens: 1.6,
137248
+ promptCacheWriteTokens: 0.4,
137249
+ promptCacheReadTokens: 0.1,
137250
+ webSearchRequests: 0.025
137251
+ };
137252
+ COST_GPT_41 = {
137253
+ inputTokens: 2,
137254
+ outputTokens: 8,
137255
+ promptCacheWriteTokens: 2,
137256
+ promptCacheReadTokens: 0.5,
137257
+ webSearchRequests: 0.025
137258
+ };
137228
137259
  DEFAULT_UNKNOWN_MODEL_COST = COST_TIER_5_25;
137229
137260
  MODEL_COSTS = {
137230
137261
  [firstPartyNameToCanonical(CLAUDE_3_5_HAIKU_CONFIG.firstParty)]: COST_HAIKU_35,
@@ -137237,7 +137268,11 @@ var init_modelCost = __esm(() => {
137237
137268
  [firstPartyNameToCanonical(CLAUDE_OPUS_4_CONFIG.firstParty)]: COST_TIER_15_75,
137238
137269
  [firstPartyNameToCanonical(CLAUDE_OPUS_4_1_CONFIG.firstParty)]: COST_TIER_15_75,
137239
137270
  [firstPartyNameToCanonical(CLAUDE_OPUS_4_5_CONFIG.firstParty)]: COST_TIER_5_25,
137240
- [firstPartyNameToCanonical(CLAUDE_OPUS_4_6_CONFIG.firstParty)]: COST_TIER_5_25
137271
+ [firstPartyNameToCanonical(CLAUDE_OPUS_4_6_CONFIG.firstParty)]: COST_TIER_5_25,
137272
+ "gpt-5.4": COST_GPT_54,
137273
+ "gpt-5.4-mini": COST_GPT_54_MINI,
137274
+ "gpt-4.1": COST_GPT_41,
137275
+ "gpt-4.1-mini": COST_GPT_41_MINI
137241
137276
  };
137242
137277
  });
137243
137278
 
@@ -137605,6 +137640,9 @@ function getPublicModelDisplayName(model) {
137605
137640
  case getModelStrings2().haiku35:
137606
137641
  return "Haiku 3.5";
137607
137642
  default:
137643
+ if (model.startsWith("gpt-")) {
137644
+ return model.toUpperCase().replace("GPT-", "GPT-");
137645
+ }
137608
137646
  return null;
137609
137647
  }
137610
137648
  }
@@ -137637,8 +137675,14 @@ function renderModelName(model) {
137637
137675
  function getPublicModelName(model) {
137638
137676
  const publicName = getPublicModelDisplayName(model);
137639
137677
  if (publicName) {
137678
+ if (model.startsWith("gpt-")) {
137679
+ return publicName;
137680
+ }
137640
137681
  return `Claude ${publicName}`;
137641
137682
  }
137683
+ if (model.startsWith("gpt-")) {
137684
+ return model;
137685
+ }
137642
137686
  return `Claude (${model})`;
137643
137687
  }
137644
137688
  function parseUserSpecifiedModel(modelInput) {
@@ -204160,7 +204204,7 @@ var init_metadata = __esm(() => {
204160
204204
  isClaudeAiAuth: isClaudeAISubscriber(),
204161
204205
  version: "2.1.88-rebuild",
204162
204206
  versionBase: getVersionBase(),
204163
- buildTime: "2026-04-01T06:28:49.572Z",
204207
+ buildTime: "2026-04-01T08:06:57.637Z",
204164
204208
  deploymentEnvironment: env4.detectDeploymentEnvironment(),
204165
204209
  ...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
204166
204210
  githubEventName: process.env.GITHUB_EVENT_NAME,
@@ -206699,6 +206743,9 @@ var init_sink = __esm(() => {
206699
206743
  // src/constants/system.ts
206700
206744
  function getCLISyspromptPrefix(options) {
206701
206745
  const apiProvider = getAPIProvider();
206746
+ if (apiProvider === "openai") {
206747
+ return OPENAI_DEFAULT_PREFIX;
206748
+ }
206702
206749
  if (apiProvider === "vertex") {
206703
206750
  return DEFAULT_PREFIX;
206704
206751
  }
@@ -206729,7 +206776,7 @@ function getAttributionHeader(fingerprint) {
206729
206776
  logForDebugging(`attribution header ${header}`);
206730
206777
  return header;
206731
206778
  }
206732
- var DEFAULT_PREFIX = `You are Claude Code, Anthropic's official CLI for Claude.`, AGENT_SDK_CLAUDE_CODE_PRESET_PREFIX = `You are Claude Code, Anthropic's official CLI for Claude, running within the Claude Agent SDK.`, AGENT_SDK_PREFIX = `You are a Claude agent, built on Anthropic's Claude Agent SDK.`, CLI_SYSPROMPT_PREFIX_VALUES, CLI_SYSPROMPT_PREFIXES;
206779
+ var DEFAULT_PREFIX = `You are Claude Code, Anthropic's official CLI for Claude.`, AGENT_SDK_CLAUDE_CODE_PRESET_PREFIX = `You are Claude Code, Anthropic's official CLI for Claude, running within the Claude Agent SDK.`, AGENT_SDK_PREFIX = `You are a Claude agent, built on Anthropic's Claude Agent SDK.`, CLI_SYSPROMPT_PREFIX_VALUES, CLI_SYSPROMPT_PREFIXES, OPENAI_DEFAULT_PREFIX = `You are Claude Code (OpenAI mode), a CLI coding assistant powered by OpenAI GPT models.`;
206733
206780
  var init_system = __esm(() => {
206734
206781
  init_growthbook();
206735
206782
  init_debug();
@@ -290038,7 +290085,8 @@ function getSSLErrorHint(error42) {
290038
290085
  if (!details?.isSSLError) {
290039
290086
  return null;
290040
290087
  }
290041
- return `SSL certificate error (${details.code}). If you are behind a corporate proxy or TLS-intercepting firewall, set NODE_EXTRA_CA_CERTS to your CA bundle path, or ask IT to allowlist *.anthropic.com. Run /doctor for details.`;
290088
+ const domain2 = isOpenAIProvider() ? "*.openai.com" : "*.anthropic.com";
290089
+ return `SSL certificate error (${details.code}). If you are behind a corporate proxy or TLS-intercepting firewall, set NODE_EXTRA_CA_CERTS to your CA bundle path, or ask IT to allowlist ${domain2}. Run /doctor for details.`;
290042
290090
  }
290043
290091
  function sanitizeMessageHTML(message) {
290044
290092
  if (message.includes("<!DOCTYPE html") || message.includes("<html")) {
@@ -290126,6 +290174,7 @@ function formatAPIError(error42) {
290126
290174
  }
290127
290175
  var SSL_ERROR_CODES;
290128
290176
  var init_errorUtils = __esm(() => {
290177
+ init_providers();
290129
290178
  SSL_ERROR_CODES = new Set([
290130
290179
  "UNABLE_TO_VERIFY_LEAF_SIGNATURE",
290131
290180
  "UNABLE_TO_GET_ISSUER_CERT",
@@ -407315,6 +407364,24 @@ function toInfraSessionId(id) {
407315
407364
  var _isCseShimEnabled;
407316
407365
 
407317
407366
  // src/constants/product.ts
407367
+ function _isOpenAI() {
407368
+ return isEnvTruthy(process.env.CLAUDE_CODE_USE_OPENAI);
407369
+ }
407370
+ function getProductName() {
407371
+ return _isOpenAI() ? "Claude Code (OpenAI)" : "Claude Code";
407372
+ }
407373
+ function getProviderName() {
407374
+ return _isOpenAI() ? "OpenAI" : "Anthropic";
407375
+ }
407376
+ function getProviderStatusUrl() {
407377
+ return _isOpenAI() ? "status.openai.com" : "status.anthropic.com";
407378
+ }
407379
+ function getProviderPolicyUrl() {
407380
+ return _isOpenAI() ? "https://openai.com/policies/usage-policies" : "https://www.anthropic.com/legal/aup";
407381
+ }
407382
+ function getAssistantLabel() {
407383
+ return _isOpenAI() ? "Assistant" : "Claude";
407384
+ }
407318
407385
  function isRemoteSessionStaging(sessionId, ingressUrl) {
407319
407386
  return sessionId?.includes("_staging_") === true || ingressUrl?.includes("staging") === true;
407320
407387
  }
@@ -407337,6 +407404,9 @@ function getRemoteSessionUrl(sessionId, ingressUrl) {
407337
407404
  return `${baseUrl}/code/${compatId}`;
407338
407405
  }
407339
407406
  var PRODUCT_URL = "https://claude.com/claude-code", CLAUDE_AI_BASE_URL = "https://claude.ai", CLAUDE_AI_STAGING_BASE_URL = "https://claude-ai.staging.ant.dev", CLAUDE_AI_LOCAL_BASE_URL = "http://localhost:4000";
407407
+ var init_product = __esm(() => {
407408
+ init_envUtils();
407409
+ });
407340
407410
 
407341
407411
  // src/keybindings/defaultBindings.ts
407342
407412
  var IMAGE_PASTE_KEY, SUPPORTS_TERMINAL_VT_MODE, MODE_CYCLE_KEY, DEFAULT_BINDINGS;
@@ -423771,7 +423841,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
423771
423841
  name: "claude-code",
423772
423842
  title: "Claude Code",
423773
423843
  version: "2.1.88-rebuild",
423774
- description: "Anthropic's agentic coding tool",
423844
+ description: "AI-powered agentic coding tool",
423775
423845
  websiteUrl: PRODUCT_URL
423776
423846
  }, {
423777
423847
  capabilities: {}
@@ -423831,6 +423901,7 @@ var init_client8 = __esm(() => {
423831
423901
  init_p_map();
423832
423902
  init_state();
423833
423903
  init_oauth();
423904
+ init_product();
423834
423905
  init_Tool();
423835
423906
  init_ListMcpResourcesTool();
423836
423907
  init_MCPTool();
@@ -424125,7 +424196,7 @@ var init_client8 = __esm(() => {
424125
424196
  name: "claude-code",
424126
424197
  title: "Claude Code",
424127
424198
  version: "2.1.88-rebuild",
424128
- description: "Anthropic's agentic coding tool",
424199
+ description: "AI-powered agentic coding tool",
424129
424200
  websiteUrl: PRODUCT_URL
424130
424201
  }, {
424131
424202
  capabilities: {
@@ -503315,7 +503386,7 @@ function buildAPIProviderProperties() {
503315
503386
  const anthropicBaseUrl = process.env.ANTHROPIC_BASE_URL;
503316
503387
  if (anthropicBaseUrl) {
503317
503388
  properties.push({
503318
- label: "Anthropic base URL",
503389
+ label: "API base URL",
503319
503390
  value: anthropicBaseUrl
503320
503391
  });
503321
503392
  }
@@ -511885,6 +511956,7 @@ function buildActiveFooterText(url3) {
511885
511956
  }
511886
511957
  var FAILED_FOOTER_TEXT = "Something went wrong, please try again";
511887
511958
  var init_bridgeStatusUtil = __esm(() => {
511959
+ init_product();
511888
511960
  init_stringWidth();
511889
511961
  init_format();
511890
511962
  init_intl();
@@ -536185,6 +536257,7 @@ function getRemoteTaskSessionUrl(sessionId) {
536185
536257
  }
536186
536258
  var REMOTE_TASK_TYPES, completionCheckers, RemoteAgentTask;
536187
536259
  var init_RemoteAgentTask = __esm(() => {
536260
+ init_product();
536188
536261
  init_xml();
536189
536262
  init_Task();
536190
536263
  init_TodoWriteTool();
@@ -574322,7 +574395,7 @@ function renderToolResultMessage15(output, _progressMessages, options) {
574322
574395
  flexDirection: "row"
574323
574396
  }, /* @__PURE__ */ import_react120.default.createElement(ThemedText, {
574324
574397
  color: "briefLabelClaude"
574325
- }, "Claude"), ts ? /* @__PURE__ */ import_react120.default.createElement(ThemedText, {
574398
+ }, getAssistantLabel()), ts ? /* @__PURE__ */ import_react120.default.createElement(ThemedText, {
574326
574399
  dimColor: true
574327
574400
  }, " ", ts) : null), /* @__PURE__ */ import_react120.default.createElement(ThemedBox_default, {
574328
574401
  flexDirection: "column"
@@ -574388,6 +574461,7 @@ var init_UI15 = __esm(() => {
574388
574461
  init_ink2();
574389
574462
  init_file();
574390
574463
  init_format();
574464
+ init_product();
574391
574465
  import_react_compiler_runtime117 = __toESM(require_dist7(), 1);
574392
574466
  import_react120 = __toESM(require_react(), 1);
574393
574467
  });
@@ -578422,7 +578496,38 @@ function getOpusPlanOption() {
578422
578496
  description: "Use Opus 4.6 in plan mode, Sonnet 4.6 otherwise"
578423
578497
  };
578424
578498
  }
578499
+ function getOpenAIModelOptions() {
578500
+ return [
578501
+ {
578502
+ value: "gpt-5.4",
578503
+ label: "GPT-5.4 (recommended)",
578504
+ description: `GPT-5.4 · Most capable · ${formatModelPricing(COST_GPT_54)}`,
578505
+ descriptionForModel: "GPT-5.4 - most capable for complex work"
578506
+ },
578507
+ {
578508
+ value: "gpt-5.4-mini",
578509
+ label: "GPT-5.4 Mini",
578510
+ description: `GPT-5.4 Mini · Fast and affordable · ${formatModelPricing(COST_GPT_54_MINI)}`,
578511
+ descriptionForModel: "GPT-5.4 Mini - fast and affordable for everyday tasks"
578512
+ },
578513
+ {
578514
+ value: "gpt-4.1",
578515
+ label: "GPT-4.1",
578516
+ description: `GPT-4.1 · Balanced performance · ${formatModelPricing(COST_GPT_41)}`,
578517
+ descriptionForModel: "GPT-4.1 - balanced performance and cost"
578518
+ },
578519
+ {
578520
+ value: "gpt-4.1-mini",
578521
+ label: "GPT-4.1 Mini",
578522
+ description: `GPT-4.1 Mini · Fastest and cheapest · ${formatModelPricing(COST_GPT_41_MINI)}`,
578523
+ descriptionForModel: "GPT-4.1 Mini - fastest and cheapest option"
578524
+ }
578525
+ ];
578526
+ }
578425
578527
  function getModelOptionsBase(fastMode = false) {
578528
+ if (isOpenAIProvider()) {
578529
+ return getOpenAIModelOptions();
578530
+ }
578426
578531
  if (process.env.USER_TYPE === "ant") {
578427
578532
  const antModelOptions = getAntModels().map((m3) => ({
578428
578533
  value: m3.alias,
@@ -578628,6 +578733,7 @@ var init_modelOptions = __esm(() => {
578628
578733
  init_model();
578629
578734
  init_context();
578630
578735
  init_config2();
578736
+ init_providers();
578631
578737
  MaxSonnet46Option = {
578632
578738
  value: "sonnet",
578633
578739
  label: "Sonnet",
@@ -585959,8 +586065,10 @@ function getAttributionTexts() {
585959
586065
  const model = getMainLoopModel();
585960
586066
  const isKnownPublicModel = getPublicModelDisplayName(model) !== null;
585961
586067
  const modelName = isInternalModelRepoCached() || isKnownPublicModel ? getPublicModelName(model) : "Claude Opus 4.6";
585962
- const defaultAttribution = `\uD83E\uDD16 Generated with [Claude Code](${PRODUCT_URL})`;
585963
- const defaultCommit = `Co-Authored-By: ${modelName} <noreply@anthropic.com>`;
586068
+ const productName = getProductName();
586069
+ const providerDomain = getProviderName() === "OpenAI" ? "openai.com" : "anthropic.com";
586070
+ const defaultAttribution = `\uD83E\uDD16 Generated with [${productName}](${PRODUCT_URL})`;
586071
+ const defaultCommit = `Co-Authored-By: ${modelName} <noreply@${providerDomain}>`;
585964
586072
  const settings = getInitialSettings();
585965
586073
  if (settings.attribution) {
585966
586074
  return {
@@ -586119,6 +586227,7 @@ async function getEnhancedPRAttribution(getAppState) {
586119
586227
  var MEMORY_ACCESS_TOOL_NAMES;
586120
586228
  var init_attribution = __esm(() => {
586121
586229
  init_state();
586230
+ init_product();
586122
586231
  init_xml();
586123
586232
  init_prompt2();
586124
586233
  init_prompt3();
@@ -592457,7 +592566,7 @@ function getAnthropicEnvMetadata() {
592457
592566
  function getBuildAgeMinutes() {
592458
592567
  if (false)
592459
592568
  ;
592460
- const buildTime = new Date("2026-04-01T06:28:49.572Z").getTime();
592569
+ const buildTime = new Date("2026-04-01T08:06:57.637Z").getTime();
592461
592570
  if (isNaN(buildTime))
592462
592571
  return;
592463
592572
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -608974,10 +609083,12 @@ function getRequestTooLargeErrorMessage() {
608974
609083
  return getIsNonInteractiveSession() ? `Request too large (${limits}). Try with a smaller file.` : `Request too large (${limits}). Double press esc to go back and try with a smaller file.`;
608975
609084
  }
608976
609085
  function getTokenRevokedErrorMessage() {
608977
- return getIsNonInteractiveSession() ? "Your account does not have access to Claude. Please login again or contact your administrator." : TOKEN_REVOKED_ERROR_MESSAGE;
609086
+ const serviceName = isOpenAIProvider() ? "OpenAI API" : "Claude";
609087
+ return getIsNonInteractiveSession() ? `Your account does not have access to ${serviceName}. Please login again or contact your administrator.` : TOKEN_REVOKED_ERROR_MESSAGE;
608978
609088
  }
608979
609089
  function getOauthOrgNotAllowedErrorMessage() {
608980
- return getIsNonInteractiveSession() ? "Your organization does not have access to Claude. Please login again or contact your administrator." : OAUTH_ORG_NOT_ALLOWED_ERROR_MESSAGE;
609090
+ const serviceName = isOpenAIProvider() ? "OpenAI API" : "Claude";
609091
+ return getIsNonInteractiveSession() ? `Your organization does not have access to ${serviceName}. Please login again or contact your administrator.` : OAUTH_ORG_NOT_ALLOWED_ERROR_MESSAGE;
608981
609092
  }
608982
609093
  function isCCRMode() {
608983
609094
  return isEnvTruthy(process.env.CLAUDE_CODE_REMOTE);
@@ -609178,7 +609289,7 @@ function getAssistantMessageFromError(error42, model, options) {
609178
609289
  const innerMessage = stripped.match(/"message"\s*:\s*"([^"]*)"/)?.[1];
609179
609290
  const detail = innerMessage || stripped;
609180
609291
  return createAssistantAPIErrorMessage({
609181
- content: `${API_ERROR_MESSAGE_PREFIX}: Request rejected (429) · ${detail || "this may be a temporary capacity issue — check status.anthropic.com"}`,
609292
+ content: `${API_ERROR_MESSAGE_PREFIX}: Request rejected (429) · ${detail || `this may be a temporary capacity issue — check ${getProviderStatusUrl()}`}`,
609182
609293
  error: "rate_limit"
609183
609294
  });
609184
609295
  }
@@ -609273,7 +609384,7 @@ Run /share and post the JSON file to ${"https://github.com/anthropics/claude-cod
609273
609384
  }
609274
609385
  if (isClaudeAISubscriber() && error42 instanceof APIError && error42.status === 400 && error42.message.toLowerCase().includes("invalid model name") && (isNonCustomOpusModel(model) || model === "opus")) {
609275
609386
  return createAssistantAPIErrorMessage({
609276
- content: "Claude Opus is not available with the Claude Pro plan. If you have updated your subscription plan recently, run /logout and /login for the plan to take effect.",
609387
+ content: `${isOpenAIProvider() ? "This model" : "Claude Opus"} is not available with ${isOpenAIProvider() ? "your current plan" : "the Claude Pro plan"}. If you have updated your subscription plan recently, run /logout and /login for the plan to take effect.`,
609277
609388
  error: "invalid_request"
609278
609389
  });
609279
609390
  }
@@ -609489,14 +609600,16 @@ function getErrorMessageIfRefusal(stopReason, model) {
609489
609600
  return;
609490
609601
  }
609491
609602
  logEvent("tengu_refusal_api_response", {});
609492
- const baseMessage = getIsNonInteractiveSession() ? `${API_ERROR_MESSAGE_PREFIX}: Claude Code is unable to respond to this request, which appears to violate our Usage Policy (https://www.anthropic.com/legal/aup). Try rephrasing the request or attempting a different approach.` : `${API_ERROR_MESSAGE_PREFIX}: Claude Code is unable to respond to this request, which appears to violate our Usage Policy (https://www.anthropic.com/legal/aup). Please double press esc to edit your last message or start a new session for Claude Code to assist with a different task.`;
609603
+ const policyUrl = getProviderPolicyUrl();
609604
+ const productName = getProductName();
609605
+ const baseMessage = getIsNonInteractiveSession() ? `${API_ERROR_MESSAGE_PREFIX}: ${productName} is unable to respond to this request, which appears to violate our Usage Policy (${policyUrl}). Try rephrasing the request or attempting a different approach.` : `${API_ERROR_MESSAGE_PREFIX}: ${productName} is unable to respond to this request, which appears to violate our Usage Policy (${policyUrl}). Please double press esc to edit your last message or start a new session for ${productName} to assist with a different task.`;
609493
609606
  const modelSuggestion = model !== "claude-sonnet-4-20250514" ? " If you are seeing this refusal repeatedly, try running /model claude-sonnet-4-20250514 to switch models." : "";
609494
609607
  return createAssistantAPIErrorMessage({
609495
609608
  content: baseMessage + modelSuggestion,
609496
609609
  error: "invalid_request"
609497
609610
  });
609498
609611
  }
609499
- var API_ERROR_MESSAGE_PREFIX = "API Error", PROMPT_TOO_LONG_ERROR_MESSAGE = "Prompt is too long", CREDIT_BALANCE_TOO_LOW_ERROR_MESSAGE = "Credit balance is too low", INVALID_API_KEY_ERROR_MESSAGE = "Not logged in · Please run /login", INVALID_API_KEY_ERROR_MESSAGE_EXTERNAL = "Invalid API key · Fix external API key", ORG_DISABLED_ERROR_MESSAGE_ENV_KEY_WITH_OAUTH = "Your ANTHROPIC_API_KEY belongs to a disabled organization · Unset the environment variable to use your subscription instead", ORG_DISABLED_ERROR_MESSAGE_ENV_KEY = "Your ANTHROPIC_API_KEY belongs to a disabled organization · Update or unset the environment variable", TOKEN_REVOKED_ERROR_MESSAGE = "OAuth token revoked · Please run /login", CCR_AUTH_ERROR_MESSAGE = "Authentication error · This may be a temporary network issue, please try again", REPEATED_529_ERROR_MESSAGE = "Repeated 529 Overloaded errors", CUSTOM_OFF_SWITCH_MESSAGE = "Opus is experiencing high load, please use /model to switch to Sonnet", API_TIMEOUT_ERROR_MESSAGE = "Request timed out", OAUTH_ORG_NOT_ALLOWED_ERROR_MESSAGE = "Your account does not have access to Claude Code. Please run /login.";
609612
+ var API_ERROR_MESSAGE_PREFIX = "API Error", PROMPT_TOO_LONG_ERROR_MESSAGE = "Prompt is too long", CREDIT_BALANCE_TOO_LOW_ERROR_MESSAGE = "Credit balance is too low", INVALID_API_KEY_ERROR_MESSAGE = "Not logged in · Please run /login", INVALID_API_KEY_ERROR_MESSAGE_EXTERNAL = "Invalid API key · Fix external API key", ORG_DISABLED_ERROR_MESSAGE_ENV_KEY_WITH_OAUTH = "Your ANTHROPIC_API_KEY belongs to a disabled organization · Unset the environment variable to use your subscription instead", ORG_DISABLED_ERROR_MESSAGE_ENV_KEY = "Your ANTHROPIC_API_KEY belongs to a disabled organization · Update or unset the environment variable", TOKEN_REVOKED_ERROR_MESSAGE = "OAuth token revoked · Please run /login", CCR_AUTH_ERROR_MESSAGE = "Authentication error · This may be a temporary network issue, please try again", REPEATED_529_ERROR_MESSAGE = "Repeated 529 Overloaded errors", CUSTOM_OFF_SWITCH_MESSAGE = "Opus is experiencing high load, please use /model to switch to Sonnet", API_TIMEOUT_ERROR_MESSAGE = "Request timed out", OAUTH_ORG_NOT_ALLOWED_ERROR_MESSAGE;
609500
609613
  var init_errors8 = __esm(() => {
609501
609614
  init_sdk();
609502
609615
  init_betas();
@@ -609505,6 +609618,7 @@ var init_errors8 = __esm(() => {
609505
609618
  init_model();
609506
609619
  init_modelStrings();
609507
609620
  init_providers();
609621
+ init_product();
609508
609622
  init_state();
609509
609623
  init_apiLimits();
609510
609624
  init_envUtils();
@@ -609515,6 +609629,7 @@ var init_errors8 = __esm(() => {
609515
609629
  init_claudeAiLimits();
609516
609630
  init_rateLimitMocking();
609517
609631
  init_errorUtils();
609632
+ OAUTH_ORG_NOT_ALLOWED_ERROR_MESSAGE = `Your account does not have access to ${getProductName()}. Please run /login.`;
609518
609633
  });
609519
609634
 
609520
609635
  // src/utils/shell/prefix.ts
@@ -631404,23 +631519,25 @@ var init_keybindings2 = __esm(() => {
631404
631519
  var login_default = () => ({
631405
631520
  type: "local-jsx",
631406
631521
  name: "login",
631407
- description: hasAnthropicApiKeyAuth() ? "Switch Anthropic accounts" : "Sign in with your Anthropic account",
631522
+ description: hasAnthropicApiKeyAuth() ? `Switch ${getProviderName()} accounts` : `Sign in with your ${getProviderName()} account`,
631408
631523
  isEnabled: () => !isEnvTruthy(process.env.DISABLE_LOGIN_COMMAND),
631409
631524
  load: () => Promise.resolve().then(() => (init_login(), exports_login))
631410
631525
  });
631411
631526
  var init_login2 = __esm(() => {
631412
631527
  init_auth2();
631413
631528
  init_envUtils();
631529
+ init_product();
631414
631530
  });
631415
631531
 
631416
631532
  // src/commands/logout/index.ts
631417
631533
  var logout_default;
631418
631534
  var init_logout2 = __esm(() => {
631419
631535
  init_envUtils();
631536
+ init_product();
631420
631537
  logout_default = {
631421
631538
  type: "local-jsx",
631422
631539
  name: "logout",
631423
- description: "Sign out from your Anthropic account",
631540
+ description: `Sign out from your ${getProviderName()} account`,
631424
631541
  isEnabled: () => !isEnvTruthy(process.env.DISABLE_LOGOUT_COMMAND),
631425
631542
  load: () => Promise.resolve().then(() => (init_logout(), exports_logout))
631426
631543
  };
@@ -661919,6 +662036,7 @@ var ULTRAPLAN_TIMEOUT_MS, CCR_TERMS_URL2 = "https://code.claude.com/docs/en/clau
661919
662036
  var init_ultraplan = __esm(() => {
661920
662037
  init_types12();
661921
662038
  init_figures2();
662039
+ init_product();
661922
662040
  init_growthbook();
661923
662041
  init_analytics();
661924
662042
  init_RemoteAgentTask();
@@ -678802,7 +678920,7 @@ var init_bridge_kick = __esm(() => {
678802
678920
  var call56 = async () => {
678803
678921
  return {
678804
678922
  type: "text",
678805
- value: `${"2.1.88-rebuild"} (built ${"2026-04-01T06:28:49.572Z"})`
678923
+ value: `${"2.1.88-rebuild"} (built ${"2026-04-01T08:06:57.637Z"})`
678806
678924
  };
678807
678925
  }, version6, version_default;
678808
678926
  var init_version = __esm(() => {
@@ -704216,7 +704334,7 @@ function CostThresholdDialog(t0) {
704216
704334
  let t4;
704217
704335
  if ($4[4] !== onDone || $4[5] !== t3) {
704218
704336
  t4 = /* @__PURE__ */ import_react290.default.createElement(Dialog, {
704219
- title: "You've spent $5 on the Anthropic API this session.",
704337
+ title: `You've spent $5 on the ${getProviderName()} API this session.`,
704220
704338
  onCancel: onDone
704221
704339
  }, t1, t3);
704222
704340
  $4[4] = onDone;
@@ -704230,6 +704348,7 @@ function CostThresholdDialog(t0) {
704230
704348
  var import_react_compiler_runtime282, import_react290;
704231
704349
  var init_CostThresholdDialog = __esm(() => {
704232
704350
  init_ink2();
704351
+ init_product();
704233
704352
  init_CustomSelect();
704234
704353
  init_Dialog();
704235
704354
  import_react_compiler_runtime282 = __toESM(require_dist7(), 1);
@@ -704874,6 +704993,7 @@ var init_useReplBridge = __esm(() => {
704874
704993
  init_inboundMessages();
704875
704994
  init_replBridgeHandle();
704876
704995
  init_commands2();
704996
+ init_product();
704877
704997
  init_notifications();
704878
704998
  init_ink2();
704879
704999
  init_growthbook();
@@ -756211,7 +756331,7 @@ function PreflightStep(t0) {
756211
756331
  gap: 1
756212
756332
  }, /* @__PURE__ */ import_react439.default.createElement(ThemedText, {
756213
756333
  color: "error"
756214
- }, "Unable to connect to Anthropic services"), /* @__PURE__ */ import_react439.default.createElement(ThemedText, {
756334
+ }, "Unable to connect to ", getProviderName(), " services"), /* @__PURE__ */ import_react439.default.createElement(ThemedText, {
756215
756335
  color: "error"
756216
756336
  }, result?.error), result?.sslHint ? /* @__PURE__ */ import_react439.default.createElement(ThemedBox_default, {
756217
756337
  flexDirection: "column",
@@ -756257,6 +756377,7 @@ var init_preflightChecks = __esm(() => {
756257
756377
  init_useTimeout();
756258
756378
  init_ink2();
756259
756379
  init_errorUtils();
756380
+ init_product();
756260
756381
  init_http2();
756261
756382
  init_log2();
756262
756383
  import_react_compiler_runtime372 = __toESM(require_dist7(), 1);
@@ -756412,7 +756533,7 @@ function WelcomeV2() {
756412
756533
  if ($4[0] !== theme2) {
756413
756534
  t02 = /* @__PURE__ */ import_react441.default.createElement(AppleTerminalWelcomeV2, {
756414
756535
  theme: theme2,
756415
- welcomeMessage: "Welcome to Claude Code"
756536
+ welcomeMessage: `Welcome to ${getProductName()}`
756416
756537
  });
756417
756538
  $4[0] = theme2;
756418
756539
  $4[1] = t02;
@@ -756434,7 +756555,7 @@ function WelcomeV2() {
756434
756555
  if ($4[2] === Symbol.for("react.memo_cache_sentinel")) {
756435
756556
  t02 = /* @__PURE__ */ import_react441.default.createElement(ThemedText, null, /* @__PURE__ */ import_react441.default.createElement(ThemedText, {
756436
756557
  color: "claude"
756437
- }, "Welcome to Claude Code", " "), /* @__PURE__ */ import_react441.default.createElement(ThemedText, {
756558
+ }, `Welcome to ${getProductName()}`, " "), /* @__PURE__ */ import_react441.default.createElement(ThemedText, {
756438
756559
  dimColor: true
756439
756560
  }, "v", "2.1.88-rebuild", " "));
756440
756561
  t17 = /* @__PURE__ */ import_react441.default.createElement(ThemedText, null, "…………………………………………………………………………………………………………………………………………………………");
@@ -756538,7 +756659,7 @@ function WelcomeV2() {
756538
756659
  if ($4[18] === Symbol.for("react.memo_cache_sentinel")) {
756539
756660
  t0 = /* @__PURE__ */ import_react441.default.createElement(ThemedText, null, /* @__PURE__ */ import_react441.default.createElement(ThemedText, {
756540
756661
  color: "claude"
756541
- }, "Welcome to Claude Code", " "), /* @__PURE__ */ import_react441.default.createElement(ThemedText, {
756662
+ }, `Welcome to ${getProductName()}`, " "), /* @__PURE__ */ import_react441.default.createElement(ThemedText, {
756542
756663
  dimColor: true
756543
756664
  }, "v", "2.1.88-rebuild", " "));
756544
756665
  t1 = /* @__PURE__ */ import_react441.default.createElement(ThemedText, null, "…………………………………………………………………………………………………………………………………………………………");
@@ -756941,6 +757062,7 @@ var import_react_compiler_runtime374, import_react441, WELCOME_V2_WIDTH = 58;
756941
757062
  var init_WelcomeV2 = __esm(() => {
756942
757063
  init_ink2();
756943
757064
  init_env();
757065
+ init_product();
756944
757066
  import_react_compiler_runtime374 = __toESM(require_dist7(), 1);
756945
757067
  import_react441 = __toESM(require_react(), 1);
756946
757068
  });
@@ -771425,6 +771547,7 @@ var init_print = __esm(() => {
771425
771547
  init_omit();
771426
771548
  init_reject2();
771427
771549
  init_policyLimits();
771550
+ init_product();
771428
771551
  init_bridgeStatusUtil();
771429
771552
  init_inboundMessages();
771430
771553
  init_inboundAttachments();
@@ -776515,6 +776638,7 @@ var init_main3 = __esm(() => {
776515
776638
  init_pickBy();
776516
776639
  init_uniqBy();
776517
776640
  init_oauth();
776641
+ init_product();
776518
776642
  init_context2();
776519
776643
  init_init3();
776520
776644
  init_history();
@@ -776667,7 +776791,8 @@ if (false) {}
776667
776791
  async function main2() {
776668
776792
  const args = process.argv.slice(2);
776669
776793
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
776670
- console.log(`${"2.1.88-rebuild"} (Claude Code)`);
776794
+ const label = process.env.CLAUDE_CODE_USE_OPENAI === "1" ? "Claude Code (OpenAI)" : "Claude Code";
776795
+ console.log(`${"2.1.88-rebuild"} (${label})`);
776671
776796
  return;
776672
776797
  }
776673
776798
  const {
@@ -776751,4 +776876,4 @@ async function main2() {
776751
776876
  }
776752
776877
  main2();
776753
776878
 
776754
- //# debugId=957A2F9C65034C9F64756E2164756E21
776879
+ //# debugId=0CF638629D23D41464756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-openai",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Claude Code CLI with OpenAI GPT-5.4 backend support",
5
5
  "type": "module",
6
6
  "bin": {