Skip to content

Comments

Correct LLM provider naming for OpenAI/Anthropic API modes#928

Open
PeterDaveHello wants to merge 1 commit intomasterfrom
rename-llm-provider-names
Open

Correct LLM provider naming for OpenAI/Anthropic API modes#928
PeterDaveHello wants to merge 1 commit intomasterfrom
rename-llm-provider-names

Conversation

@PeterDaveHello
Copy link
Member

@PeterDaveHello PeterDaveHello commented Feb 22, 2026

User description

Summary

Corrects LLM provider naming to follow common terminology: OpenAI API and Anthropic API for API access, while keeping ChatGPT and Claude for web products.

Changes

UI Display Names:

  • ChatGPT (API)OpenAI (API)
  • ChatGPT (Azure API)Azure OpenAI (API)
  • Claude.ai (API)Anthropic (API) (all Claude API model variants)

Locale Strings:

  • Custom Claude API UrlCustom Anthropic API Url
  • Add Anthropic API Key with translations in all 13 locales

Internal Code:

  • Rename generateAnswersWithChatgptApigenerateAnswersWithOpenAiApi
  • Rename generateAnswersWithChatgptApiCompatgenerateAnswersWithOpenAiApiCompat

Config Keys:

  • claudeApiKeyanthropicApiKey
  • customClaudeApiUrlcustomAnthropicApiUrl
  • Add migration logic to preserve existing user settings:
    • Persists new keys before removing old ones
    • Always migrates when old keys exist (handles legacy backup imports)

Unchanged:

  • Web mode names (ChatGPT (Web), Claude.ai (Web)) - these refer to web products

Rationale

"OpenAI API" and "Anthropic API" are the commonly used terms when referring to programmatic API access. Product names like ChatGPT and Claude are appropriate for web interfaces, but less precise for API settings.


PR Type

Enhancement


Description

  • Rename LLM provider display names to use company names for API modes

    • ChatGPT (API)OpenAI (API)
    • Claude.ai (API)Anthropic (API)
    • ChatGPT (Azure API)Azure OpenAI (API)
  • Update internal function names for consistency with API provider terminology

    • generateAnswersWithChatgptApigenerateAnswersWithOpenAiApi
    • generateAnswersWithChatgptApiCompatgenerateAnswersWithOpenAiApiCompat
  • Add missing Anthropic API Key locale string across all language files

  • Update locale strings to use Anthropic instead of Claude for API-related settings


Diagram Walkthrough

flowchart LR
  A["Display Names<br/>ChatGPT/Claude.ai"] -->|Rename to| B["Company Names<br/>OpenAI/Anthropic"]
  C["Function Names<br/>generateAnswersWithChatgptApi"] -->|Rename to| D["Function Names<br/>generateAnswersWithOpenAiApi"]
  E["Locale Strings<br/>Custom Claude API Url"] -->|Update to| F["Locale Strings<br/>Custom Anthropic API Url"]
  B --> G["Consistent API<br/>Provider Terminology"]
  D --> G
  F --> G
Loading

File Walkthrough

Relevant files
Localization
13 files
main.json
Update German locale strings for Anthropic API                     
+2/-1     
main.json
Update English locale strings for Anthropic API                   
+2/-1     
main.json
Update Spanish locale strings for Anthropic API                   
+2/-1     
main.json
Update French locale strings for Anthropic API                     
+2/-1     
main.json
Update Indonesian locale strings for Anthropic API             
+2/-1     
main.json
Update Italian locale strings for Anthropic API                   
+2/-1     
main.json
Update Japanese locale strings for Anthropic API                 
+2/-1     
main.json
Update Korean locale strings for Anthropic API                     
+2/-1     
main.json
Update Portuguese locale strings for Anthropic API             
+2/-1     
main.json
Update Russian locale strings for Anthropic API                   
+2/-1     
main.json
Update Turkish locale strings for Anthropic API                   
+2/-1     
main.json
Update Simplified Chinese locale strings for Anthropic API
+2/-1     
main.json
Update Traditional Chinese locale strings for Anthropic API
+2/-1     
Enhancement
11 files
index.mjs
Rename ChatGPT API function to OpenAI API                               
+3/-3     
index.mjs
Update model group and model display names for API providers
+31/-31 
AdvancedPart.jsx
Update Custom Anthropic API URL label in UI                           
+1/-1     
GeneralPart.jsx
Update Anthropic API Key placeholder text                               
+1/-1     
aiml-api.mjs
Rename OpenAI API compat function call                                     
+2/-2     
chatglm-api.mjs
Rename OpenAI API compat function call                                     
+2/-2     
deepseek-api.mjs
Rename OpenAI API compat function call                                     
+2/-2     
moonshot-api.mjs
Rename OpenAI API compat function call                                     
+2/-2     
ollama-api.mjs
Rename OpenAI API compat function call                                     
+2/-2     
openai-api.mjs
Rename ChatGPT API functions to OpenAI API                             
+3/-3     
openrouter-api.mjs
Rename OpenAI API compat function call                                     
+2/-2     
Tests
1 files
openai-api-compat.test.mjs
Update test names for OpenAI API compat function                 
+11/-11 

Summary by CodeRabbit

  • New Features

    • Added Anthropic API Key option and translations across locales.
  • Chores

    • Unified provider naming in the UI: ChatGPT → OpenAI, Claude → Anthropic.
    • Updated model labels and descriptions in settings and selectors for consistency.
    • Renamed the custom API URL label to reference Anthropic where applicable and migrated existing Claude-related settings to the new Anthropic naming.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 22, 2026

📝 Walkthrough

Walkthrough

Renames provider terminology and API function identifiers: ChatGPT → OpenAI and Claude.ai → Anthropic. Updates include locale key renames/additions, model descriptor text changes, config key migrations, service function renames and updated call sites, popup label updates, and a related test rename.

Changes

Cohort / File(s) Summary
Localization updates
src/_locales/*/main.json (e.g., src/_locales/en/main.json, src/_locales/de/main.json, src/_locales/es/main.json, src/_locales/fr/main.json, src/_locales/it/main.json, src/_locales/ja/main.json, src/_locales/ko/main.json, src/_locales/pt/main.json, src/_locales/ru/main.json, src/_locales/tr/main.json, src/_locales/zh-hans/main.json, src/_locales/zh-hant/main.json, src/_locales/in/main.json)
Renamed key Custom Claude API UrlCustom Anthropic API Url, added Anthropic API Key, and updated provider/model label text in multiple locales.
Config / model registry
src/config/index.mjs
Updated ModelGroups/Models descriptors (ChatGPT → OpenAI, Claude.ai → Anthropic, ChatGPT (Azure) → Azure OpenAI), renamed default config keys (claudeApiKeyanthropicApiKey, customClaudeApiUrlcustomAnthropicApiUrl), and added migration logic to move old keys to new ones.
API service renames & call sites
src/services/apis/openai-api.mjs, src/services/apis/aiml-api.mjs, src/services/apis/chatglm-api.mjs, src/services/apis/deepseek-api.mjs, src/services/apis/moonshot-api.mjs, src/services/apis/ollama-api.mjs, src/services/apis/openrouter-api.mjs
Renamed exported/internal functions: generateAnswersWithChatgptApigenerateAnswersWithOpenAiApi and generateAnswersWithChatgptApiCompatgenerateAnswersWithOpenAiApiCompat; updated imports and all call sites accordingly.
Background wiring
src/background/index.mjs
Switched import and calls to the renamed OpenAI API function and updated log/label strings to OpenAI/Anthropic naming.
Provider-specific API update
src/services/apis/claude-api.mjs
Replaced references to config.customClaudeApiUrlconfig.customAnthropicApiUrl and config.claudeApiKeyconfig.anthropicApiKey (no control-flow changes).
Popup UI labels
src/popup/sections/AdvancedPart.jsx, src/popup/sections/GeneralPart.jsx
Updated visible field labels/placeholders and bound config keys: Custom Claude API UrlCustom Anthropic API Url, claudeApiKeyanthropicApiKey, and corresponding update calls.
Tests
tests/unit/services/apis/openai-api-compat.test.mjs
Updated test imports, names, and calls to use generateAnswersWithOpenAiApiCompat instead of the previous ChatGPT-named symbol.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

Review effort 3/5

Suggested reviewers

  • kmk142789

Poem

🐰 I hopped through keys and strings so neat,
Swapped Claude for Anthropic, made labels meet,
ChatGPT to OpenAI, imports aligned,
Locales, config, and tests gently refined,
A rabbit's cheer — small changes, tidy feat!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 69.23% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: correcting LLM provider naming to use company names (OpenAI/Anthropic) instead of product names (ChatGPT/Claude) for API modes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch rename-llm-provider-names

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Feb 22, 2026

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

  • Update
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@gemini-code-assist
Copy link

Summary of Changes

Hello @PeterDaveHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the naming conventions for Large Language Model (LLM) providers within the application, specifically differentiating between API access and web product interfaces. The primary goal is to standardize terminology, using 'OpenAI API' and 'Anthropic API' for programmatic access while retaining 'ChatGPT' and 'Claude' for their respective web-based products. This change improves clarity and consistency for users interacting with various LLM services.

Highlights

  • UI Display Names Standardized: Updated UI display names for API access to use 'OpenAI (API)' instead of 'ChatGPT (API)', 'Azure OpenAI (API)' instead of 'ChatGPT (Azure API)', and 'Anthropic (API)' instead of 'Claude.ai (API)' for all Claude API model variants. This clarifies the distinction between company APIs and product web interfaces.
  • Locale String Updates: Modified locale strings across multiple languages, changing 'Custom Claude API Url' to 'Custom Anthropic API Url' and adding the missing 'Anthropic API Key' translation.
  • Internal Function Renaming: Renamed internal functions generateAnswersWithChatgptApi to generateAnswersWithOpenAiApi and generateAnswersWithChatgptApiCompat to generateAnswersWithOpenAiApiCompat to align with the new naming conventions.
  • No Changes to Web Mode Names or Config Keys: Web mode names (e.g., 'ChatGPT (Web)', 'Claude.ai (Web)') and internal configuration keys (e.g., claudeApiKey, customClaudeApiUrl) remain unchanged to avoid breaking existing functionality or requiring data migration.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • src/_locales/de/main.json
    • Updated 'Custom Claude API Url' to 'Benutzerdefinierte Anthropic API-URL'.
    • Added 'Anthropic API Key' translation.
  • src/_locales/en/main.json
    • Updated 'Custom Claude API Url' to 'Custom Anthropic API Url'.
    • Added 'Anthropic API Key' translation.
  • src/_locales/es/main.json
    • Updated 'Custom Claude API Url' to 'URL personalizada de la API de Anthropic'.
    • Added 'Anthropic API Key' translation.
  • src/_locales/fr/main.json
    • Updated 'Custom Claude API Url' to 'URL API Anthropic personnalisée'.
    • Added 'Anthropic API Key' translation.
  • src/_locales/in/main.json
    • Updated 'Custom Claude API Url' to 'URL API Anthropic Kustom'.
    • Added 'Anthropic API Key' translation.
  • src/_locales/it/main.json
    • Updated 'Custom Claude API Url' to 'URL API Anthropic personalizzato'.
    • Added 'Anthropic API Key' translation.
  • src/_locales/ja/main.json
    • Updated 'Custom Claude API Url' to 'カスタムAnthropic APIのURL'.
    • Added 'Anthropic API キー' translation.
  • src/_locales/ko/main.json
    • Updated 'Custom Claude API Url' to '사용자 정의 Anthropic API URL'.
    • Added 'Anthropic API 키' translation.
  • src/_locales/pt/main.json
    • Updated 'Custom Claude API Url' to 'URL da API Personalizada do Anthropic'.
    • Added 'Anthropic API Key' translation.
  • src/_locales/ru/main.json
    • Updated 'Custom Claude API Url' to 'Пользовательский URL API Anthropic'.
    • Added 'Anthropic API Key' translation.
  • src/_locales/tr/main.json
    • Updated 'Custom Claude API Url' to 'Özel Anthropic API Url'si'.
    • Added 'Anthropic API Key' translation.
  • src/_locales/zh-hans/main.json
    • Updated 'Custom Claude API Url' to '自定义的Anthropic API地址'.
    • Added 'Anthropic API 密钥' translation.
  • src/_locales/zh-hant/main.json
    • Updated 'Custom Claude API Url' to '自訂 Anthropic API 網址'.
    • Added 'Anthropic API 金鑰' translation.
  • src/background/index.mjs
    • Renamed generateAnswersWithChatgptApi to generateAnswersWithOpenAiApi.
    • Updated usage of the renamed function.
  • src/config/index.mjs
    • Updated display names for OpenAI API model groups from 'ChatGPT (API)' to 'OpenAI (API)'.
    • Updated display names for Anthropic API model groups from 'Claude.ai (API)' to 'Anthropic (API)'.
    • Updated display names for Azure OpenAI API model groups from 'ChatGPT (Azure API)' to 'Azure OpenAI (API)'.
    • Updated display names for various specific OpenAI API models to use 'OpenAI' instead of 'ChatGPT'.
  • src/popup/sections/AdvancedPart.jsx
    • Updated the displayed label for the custom Claude API URL to 'Custom Anthropic API Url'.
  • src/popup/sections/GeneralPart.jsx
    • Updated the placeholder text for the Claude API Key input field to 'Anthropic API Key'.
  • src/services/apis/aiml-api.mjs
    • Updated import and usage of generateAnswersWithChatgptApiCompat to generateAnswersWithOpenAiApiCompat.
  • src/services/apis/chatglm-api.mjs
    • Updated import and usage of generateAnswersWithChatgptApiCompat to generateAnswersWithOpenAiApiCompat.
  • src/services/apis/deepseek-api.mjs
    • Updated import and usage of generateAnswersWithChatgptApiCompat to generateAnswersWithOpenAiApiCompat.
  • src/services/apis/moonshot-api.mjs
    • Updated import and usage of generateAnswersWithChatgptApiCompat to generateAnswersWithOpenAiApiCompat.
  • src/services/apis/ollama-api.mjs
    • Updated import and usage of generateAnswersWithChatgptApiCompat to generateAnswersWithOpenAiApiCompat.
  • src/services/apis/openai-api.mjs
    • Renamed generateAnswersWithChatgptApi to generateAnswersWithOpenAiApi.
    • Renamed generateAnswersWithChatgptApiCompat to generateAnswersWithOpenAiApiCompat.
  • src/services/apis/openrouter-api.mjs
    • Updated import and usage of generateAnswersWithChatgptApiCompat to generateAnswersWithOpenAiApiCompat.
  • tests/unit/services/apis/openai-api-compat.test.mjs
    • Updated imports to reflect the generateAnswersWithOpenAiApiCompat rename.
    • Updated test descriptions to reflect the generateAnswersWithOpenAiApiCompat rename.
    • Updated function calls within tests to use generateAnswersWithOpenAiApiCompat.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Feb 22, 2026

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Update API key state management

In GeneralPart.jsx, update the API key input to use config.anthropicApiKey for
its value and updateConfig({ anthropicApiKey: ... }) in its onChange handler for
consistency with the "Anthropic" rebranding.

src/popup/sections/GeneralPart.jsx [289-299]

 {isUsingClaudeApiModel(config) && (
   <input
     type="password"
     style="width: 50%;"
-    value={config.claudeApiKey}
+    value={config.anthropicApiKey}
     placeholder={t('Anthropic API Key')}
     onChange={(e) => {
       const apiKey = e.target.value
-      updateConfig({ claudeApiKey: apiKey })
+      updateConfig({ anthropicApiKey: apiKey })
     }}
   />
 )}

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 7

__

Why: The suggestion correctly identifies that the refactoring from Claude to Anthropic is incomplete, as the state logic still uses claudeApiKey while the UI has been updated, which is a logical inconsistency.

Medium
General
Localize Anthropic API Key

In src/_locales/de/main.json, provide a German translation for the "Anthropic
API Key" key, for example, "Anthropic-API-Schlüssel".

src/_locales/de/main.json [137]

-"Anthropic API Key": "Anthropic API Key"
+"Anthropic API Key": "Anthropic-API-Schlüssel"

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 5

__

Why: The suggestion correctly points out a missing German translation for a new key, which improves localization and user experience for German-speaking users.

Low
Update Claude log label
Suggestion Impact:The commit changed the console.debug message in src/background/index.mjs to "Using Anthropic API Model" as suggested.

code diff:

-      console.debug('[background] Using Claude API Model')
+      console.debug('[background] Using Anthropic API Model')

In src/background/index.mjs, update the debug log message from "Using Claude API
Model" to "Using Anthropic API Model" for consistency.

src/background/index.mjs [588]

-console.debug('[background] Using Claude API Model')
+console.debug('[background] Using Anthropic API Model')

[Suggestion processed]

Suggestion importance[1-10]: 4

__

Why: The suggestion improves consistency by aligning a debug log message with the Claude to Anthropic renaming, which is a good practice for maintainability, though it has a low impact on functionality.

Low
  • Update

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fa574556af

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


chatgptApi35: { value: 'gpt-3.5-turbo', desc: 'ChatGPT (GPT-3.5-turbo)' },
chatgptApi35_16k: { value: 'gpt-3.5-turbo-16k', desc: 'ChatGPT (GPT-3.5-turbo-16k)' },
chatgptApi35: { value: 'gpt-3.5-turbo', desc: 'OpenAI (GPT-3.5-turbo)' },

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve translation keys for API model labels

modelNameToDesc translates model labels via t(Models[modelName].desc) (src/utils/model-name-convert.mjs), so changing the key text here from ChatGPT (...)/Claude.ai (...) to new strings without adding matching locale entries causes non-English locales to fall back to raw English labels in the API mode UI. This commit introduces that regression (e.g., existing locale keys like "ChatGPT (GPT-3.5-turbo)" are still present, but "OpenAI (GPT-3.5-turbo)" is not), and it also conflicts with AGENTS.md’s localization rule (“do not change keys”).

Useful? React with 👍 / 👎.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🧹 Nitpick comments (5)
src/services/apis/openai-api.mjs (1)

17-17: generateAnswersWithGptCompletionApi not aligned with the new OpenAI naming convention.

The rest of the file now uses generateAnswersWithOpenAi* prefixes, but this legacy completions endpoint function still carries the Gpt prefix, which is inconsistent. Consider renaming to generateAnswersWithOpenAiGptCompletionApi or generateAnswersWithOpenAiCompletionApi for uniformity.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/services/apis/openai-api.mjs` at line 17, The function name
generateAnswersWithGptCompletionApi is inconsistent with the file's OpenAI
naming convention; rename the function and its exported identifier to a
consistent name such as generateAnswersWithOpenAiCompletionApi (or
generateAnswersWithOpenAiGptCompletionApi if you want to keep "Gpt" in the
name), and update all references/imports/exports to use the new identifier
(search for generateAnswersWithGptCompletionApi and replace occurrences in this
module and any modules importing it, keeping the function body and signature
unchanged).
src/_locales/ru/main.json (1)

137-137: Optional: translate the "Anthropic API Key" value.

Line 85 translates generic "API Key" as "Ключ API", but this entry keeps the English value. "Ключ API Anthropic" would be consistent with the Russian locale style.

♻️ Suggested translation
-  "Anthropic API Key": "Anthropic API Key",
+  "Anthropic API Key": "Ключ API Anthropic",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/_locales/ru/main.json` at line 137, The value for the JSON key "Anthropic
API Key" is still in English; update its translated value to match the Russian
locale style (e.g., change the value to "Ключ API Anthropic") so it is
consistent with the other "API Key" translations; locate the entry with the key
"Anthropic API Key" in src/_locales/ru/main.json and replace the English string
value with the Russian translation.
src/_locales/tr/main.json (1)

137-137: Optional: translate the "Anthropic API Key" value.

The generic "API Key" at Line 85 is translated as "API Anahtarı", but the new "Anthropic API Key" entry keeps its English value. Consider "Anthropic API Anahtarı" for internal consistency within the Turkish locale.

♻️ Suggested translation
-  "Anthropic API Key": "Anthropic API Key",
+  "Anthropic API Key": "Anthropic API Anahtarı",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/_locales/tr/main.json` at line 137, Update the Turkish translation for
the "Anthropic API Key" locale entry: replace the current English value
"Anthropic API Key" with the Turkish equivalent "Anthropic API Anahtarı" so it
matches the existing translation style (e.g., "API Key" => "API Anahtarı") and
keep the JSON key "Anthropic API Key" unchanged to preserve lookup.
src/_locales/fr/main.json (1)

137-137: Optional: translate the "Anthropic API Key" value.

Line 85 translates "API Key" as "Clé API", but this entry keeps the English value. "Clé API Anthropic" would be consistent with the French locale style.

♻️ Suggested translation
-  "Anthropic API Key": "Anthropic API Key",
+  "Anthropic API Key": "Clé API Anthropic",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/_locales/fr/main.json` at line 137, Translate the JSON value for the
"Anthropic API Key" entry to French to match the locale style; update the value
for the key "Anthropic API Key" from the English string to the French
translation (e.g., "Clé API Anthropic") so it is consistent with the existing
"API Key" -> "Clé API" translation.
src/config/index.mjs (1)

253-291: LGTM — all Anthropic provider desc renames are correct and consistent.

The prior concern about claudeSonnet45Api's identifier is resolved: Claude Sonnet 4.5 is available via the Claude API using model string claude-sonnet-4-5-20250929.

As a pre-existing side-note (not introduced by this PR): claudeOpus45Api and claudeOpus46Api use undated bare identifiers (claude-opus-4-5, claude-opus-4-6), which can produce model_not_found errors when routed through a custom base URL or proxy that requires full snapshot IDs. All other Anthropic entries in this group use dated snapshot identifiers — consider adding snapshot dates when those models stabilize.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/config/index.mjs` around lines 253 - 291, The two Anthropic entries
claudeOpus45Api and claudeOpus46Api currently use undated bare model identifiers
('claude-opus-4-5' and 'claude-opus-4-6') which can cause model_not_found errors
when using custom base URLs/proxies; update the value fields for claudeOpus45Api
and claudeOpus46Api in the config (src/config/index.mjs) to the full dated
snapshot model strings once the stable snapshot IDs are known (matching the
pattern used by other entries such as claudeSonnet45Api), or if snapshot IDs are
not yet available add a clear TODO comment and implement a safe fallback (e.g.,
detect proxy mode and avoid using bare identifiers) so the app doesn't route
undated names through proxies.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/_locales/en/main.json`:
- Around line 136-137: You renamed a localization key in
src/_locales/en/main.json which violates the "Do not change keys" rule; revert
the rename by restoring the original "Custom Claude API Url" key and its value
in en/main.json, add a new separate key "Custom Anthropic API Url" with the
desired value (do not remove the original), propagate the new key to all other
locale files (adding the new entry alongside existing ones), and update any
consumers that should use the new key to reference "Custom Anthropic API Url"
while leaving consumers still using "Custom Claude API Url" unchanged to
preserve backward compatibility.

In `@src/_locales/es/main.json`:
- Line 137: The JSON entry with key "Anthropic API Key" currently has an
untranslated value; update the value for the "Anthropic API Key" entry (the
string key "Anthropic API Key") in src/_locales/es/main.json to the Spanish
translation "Anthropic Clave de API" so it matches the existing translation
style (keep the brand name and translate the descriptor).
- Around line 136-137: The Spanish locale has the value for the key "Anthropic
API Key" left in English; update the value for the JSON key "Anthropic API Key"
in es/main.json to a proper Spanish translation such as "Clave de la API de
Anthropic" (matching the pattern used for "Custom Anthropic API Url"/"URL
personalizada de la API de Anthropic") so the localization is complete.

In `@src/_locales/ja/main.json`:
- Line 137: The translation for the JSON key "Anthropic API Key" has an
inconsistent space—update its value from "Anthropic API キー" to "Anthropic APIキー"
to match the existing style used for "API Key": "APIキー"; locate the "Anthropic
API Key" entry and remove the space before "キー" so translations remain
consistent.

In `@src/background/index.mjs`:
- Around line 584-586: The log message is misleading: when the guard is
isUsingChatgptApiModel and you call generateAnswersWithOpenAiApi, change the
console.debug text to explicitly say "Using ChatGPT API Model" to match the
condition and handler; update the console.debug('[background] Using OpenAI API
Model') line to console.debug('[background] Using ChatGPT API Model') (keep the
same surrounding context where isUsingChatgptApiModel and
generateAnswersWithOpenAiApi(port, session.question, session, config.apiKey) are
used).

In `@src/config/index.mjs`:
- Around line 245-246: Update the descriptions for the two config entries to
clearly distinguish the legacy GPT‑5 snapshot from the current GPT‑5.1 snapshot:
change the chatgptApi5Latest entry (symbol: chatgptApi5Latest) to indicate it is
a legacy/previous GPT‑5 snapshot (e.g., "OpenAI (GPT‑5 legacy snapshot)") and
make chatgptApi5_1Latest (symbol: chatgptApi5_1Latest) explicitly state it is
the current GPT‑5.1 snapshot (e.g., "OpenAI (GPT‑5.1 latest snapshot)");
alternatively, add a short note in the config comment documenting that
chatgptApi5Latest is legacy.

---

Nitpick comments:
In `@src/_locales/fr/main.json`:
- Line 137: Translate the JSON value for the "Anthropic API Key" entry to French
to match the locale style; update the value for the key "Anthropic API Key" from
the English string to the French translation (e.g., "Clé API Anthropic") so it
is consistent with the existing "API Key" -> "Clé API" translation.

In `@src/_locales/ru/main.json`:
- Line 137: The value for the JSON key "Anthropic API Key" is still in English;
update its translated value to match the Russian locale style (e.g., change the
value to "Ключ API Anthropic") so it is consistent with the other "API Key"
translations; locate the entry with the key "Anthropic API Key" in
src/_locales/ru/main.json and replace the English string value with the Russian
translation.

In `@src/_locales/tr/main.json`:
- Line 137: Update the Turkish translation for the "Anthropic API Key" locale
entry: replace the current English value "Anthropic API Key" with the Turkish
equivalent "Anthropic API Anahtarı" so it matches the existing translation style
(e.g., "API Key" => "API Anahtarı") and keep the JSON key "Anthropic API Key"
unchanged to preserve lookup.

In `@src/config/index.mjs`:
- Around line 253-291: The two Anthropic entries claudeOpus45Api and
claudeOpus46Api currently use undated bare model identifiers ('claude-opus-4-5'
and 'claude-opus-4-6') which can cause model_not_found errors when using custom
base URLs/proxies; update the value fields for claudeOpus45Api and
claudeOpus46Api in the config (src/config/index.mjs) to the full dated snapshot
model strings once the stable snapshot IDs are known (matching the pattern used
by other entries such as claudeSonnet45Api), or if snapshot IDs are not yet
available add a clear TODO comment and implement a safe fallback (e.g., detect
proxy mode and avoid using bare identifiers) so the app doesn't route undated
names through proxies.

In `@src/services/apis/openai-api.mjs`:
- Line 17: The function name generateAnswersWithGptCompletionApi is inconsistent
with the file's OpenAI naming convention; rename the function and its exported
identifier to a consistent name such as generateAnswersWithOpenAiCompletionApi
(or generateAnswersWithOpenAiGptCompletionApi if you want to keep "Gpt" in the
name), and update all references/imports/exports to use the new identifier
(search for generateAnswersWithGptCompletionApi and replace occurrences in this
module and any modules importing it, keeping the function body and signature
unchanged).

Comment on lines +136 to +137
"Custom Anthropic API Url": "Custom Anthropic API Url",
"Anthropic API Key": "Anthropic API Key",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# 1. Confirm no source file still references the old locale key
echo "=== Old key references in source ==="
rg --type=js --type=jsx -n "Custom Claude API Url" || echo "None found"

# 2. Confirm no locale file still has the old key
echo ""
echo "=== Locale files retaining old key ==="
rg -n "Custom Claude API Url" --glob="**/main.json" || echo "None found"

# 3. Confirm all locale files have the new keys
echo ""
echo "=== Locale files MISSING new keys ==="
fd -e json "main.json" --search-path src/_locales --exec sh -c \
  'grep -q "Custom Anthropic API Url" "$1" || echo "Missing Custom Anthropic API Url: $1"; \
   grep -q "Anthropic API Key" "$1" || echo "Missing Anthropic API Key: $1"' _ {}

# 4. Confirm no remaining references to generateAnswersWithChatgptApiCompat
echo ""
echo "=== Stale generateAnswersWithChatgptApiCompat references ==="
rg -n "generateAnswersWithChatgptApiCompat" || echo "None found"

Repository: ChatGPTBox-dev/chatGPTBox

Length of output: 324


Key rename in en/main.json violates the "Do not change keys" guideline.

Per coding guidelines, keys in src/_locales/en/main.json should not be changed; instead, new strings should be added and propagated to other locales. This PR changed "Custom Claude API Url" to "Custom Anthropic API Url", which is a key rename rather than adding a new key.

Verification confirms the migration is complete across all in-tree files:

  • No references to the old key remain in source files or any locale file
  • All new keys are present in all locale files
  • All consumers have been updated

While the implementation is comprehensive and correct, the guideline exists to prevent breaking changes in localization keys. Future PRs should add new keys alongside old ones to maintain backward compatibility.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/_locales/en/main.json` around lines 136 - 137, You renamed a localization
key in src/_locales/en/main.json which violates the "Do not change keys" rule;
revert the rename by restoring the original "Custom Claude API Url" key and its
value in en/main.json, add a new separate key "Custom Anthropic API Url" with
the desired value (do not remove the original), propagate the new key to all
other locale files (adding the new entry alongside existing ones), and update
any consumers that should use the new key to reference "Custom Anthropic API
Url" while leaving consumers still using "Custom Claude API Url" unchanged to
preserve backward compatibility.

"Hide context menu of this extension": "Ocultar menú contextual de esta extensión",
"Custom Claude API Url": "URL personalizada de la API de Claude",
"Custom Anthropic API Url": "URL personalizada de la API de Anthropic",
"Anthropic API Key": "Anthropic API Key",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

"Anthropic API Key" value is untranslated.

The existing entry "API Key": "Clave de API" at line 85 translates the term, but the new entry uses the English string as-is. For consistency, the value should be "Anthropic Clave de API" (keeping the brand name, translating the descriptor).

🌐 Suggested fix
-  "Anthropic API Key": "Anthropic API Key",
+  "Anthropic API Key": "Anthropic Clave de API",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"Anthropic API Key": "Anthropic API Key",
"Anthropic API Key": "Anthropic Clave de API",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/_locales/es/main.json` at line 137, The JSON entry with key "Anthropic
API Key" currently has an untranslated value; update the value for the
"Anthropic API Key" entry (the string key "Anthropic API Key") in
src/_locales/es/main.json to the Spanish translation "Anthropic Clave de API" so
it matches the existing translation style (keep the brand name and translate the
descriptor).

"Hide context menu of this extension": "この拡張機能のコンテキストメニューを非表示",
"Custom Claude API Url": "カスタムClaude APIのURL",
"Custom Anthropic API Url": "カスタムAnthropic APIのURL",
"Anthropic API Key": "Anthropic API キー",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Minor spacing inconsistency in Japanese translation.

"Anthropic API キー" has a space before キー, while the existing "API Key": "APIキー" (line 85) has no space. Consider aligning to "Anthropic APIキー" for consistency.

🛠️ Suggested fix
-  "Anthropic API Key": "Anthropic API キー",
+  "Anthropic API Key": "Anthropic APIキー",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"Anthropic API Key": "Anthropic API キー",
"Anthropic API Key": "Anthropic APIキー",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/_locales/ja/main.json` at line 137, The translation for the JSON key
"Anthropic API Key" has an inconsistent space—update its value from "Anthropic
API キー" to "Anthropic APIキー" to match the existing style used for "API Key":
"APIキー"; locate the "Anthropic API Key" entry and remove the space before "キー"
so translations remain consistent.

Comment on lines 584 to +586
} else if (isUsingChatgptApiModel(session)) {
console.debug('[background] Using ChatGPT API Model')
await generateAnswersWithChatgptApi(port, session.question, session, config.apiKey)
console.debug('[background] Using OpenAI API Model')
await generateAnswersWithOpenAiApi(port, session.question, session, config.apiKey)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find all usages of isUsingChatgptApiModel to scope the rename effort
rg -n "isUsingChatgptApiModel" --type=js --type=mjs -g '*.mjs' -g '*.js' -g '*.jsx'

Repository: ChatGPTBox-dev/chatGPTBox

Length of output: 96


🏁 Script executed:

#!/bin/bash
# Find all usages of isUsingChatgptApiModel using glob patterns
rg -n "isUsingChatgptApiModel" -g '*.mjs' -g '*.js' -g '*.jsx'

Repository: ChatGPTBox-dev/chatGPTBox

Length of output: 407


🏁 Script executed:

#!/bin/bash
# View the function definition and related code
sed -n '655,675p' src/config/index.mjs

Repository: ChatGPTBox-dev/chatGPTBox

Length of output: 723


🏁 Script executed:

#!/bin/bash
# View the context around line 584 in src/background/index.mjs
sed -n '570,600p' src/background/index.mjs

Repository: ChatGPTBox-dev/chatGPTBox

Length of output: 1709


🏁 Script executed:

#!/bin/bash
# Search for isUsingGptCompletionApiModel in background file
rg -n "isUsingGptCompletionApiModel" -A 3 src/background/index.mjs

Repository: ChatGPTBox-dev/chatGPTBox

Length of output: 482


The log message should specifically say "Using ChatGPT API Model" instead of "Using OpenAI API Model".

The guard condition at line 584 (isUsingChatgptApiModel) checks specifically for ChatGPT API models, but the log says "Using OpenAI API Model" which is misleading. GPT Completion API models are handled separately at line 621 with a different handler function (generateAnswersWithGptCompletionApi). The log should match the specific condition being checked.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/background/index.mjs` around lines 584 - 586, The log message is
misleading: when the guard is isUsingChatgptApiModel and you call
generateAnswersWithOpenAiApi, change the console.debug text to explicitly say
"Using ChatGPT API Model" to match the condition and handler; update the
console.debug('[background] Using OpenAI API Model') line to
console.debug('[background] Using ChatGPT API Model') (keep the same surrounding
context where isUsingChatgptApiModel and generateAnswersWithOpenAiApi(port,
session.question, session, config.apiKey) are used).

Comment on lines +245 to +246
chatgptApi5Latest: { value: 'gpt-5-chat-latest', desc: 'OpenAI (GPT-5 latest)' },
chatgptApi5_1Latest: { value: 'gpt-5.1-chat-latest', desc: 'OpenAI (GPT-5.1 latest)' },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

OpenAI API models gpt-5-chat-latest gpt-5.1-chat-latest current documentation

💡 Result:

Current OpenAI API docs for gpt-5-chat-latest and gpt-5.1-chat-latest

Docs pages (official):

https://platform.openai.com/docs/models/gpt-5-chat-latest
https://platform.openai.com/docs/models/gpt-5.1-chat-latest

(platform.openai.com)

What these aliases mean (per docs):

  • gpt-5.1-chat-latest: points to the GPT‑5.1 snapshot currently used in ChatGPT. (platform.openai.com)
  • gpt-5-chat-latest: points to the GPT‑5 snapshot previously used in ChatGPT (i.e., older than GPT‑5.1 for “ChatGPT chat” usage). (platform.openai.com)

Key specs shown on the model pages (as of the current docs crawl):

  • Context window: 128,000
  • Max output tokens: 16,384
  • Knowledge cutoff shown: Sep 30, 2024
  • Token pricing shown: $1.25 / 1M input, $0.125 / 1M cached input, $10 / 1M output
  • Endpoints listed: Chat Completions (v1/chat/completions), Responses (v1/responses), plus others (Realtime, Assistants, Batch, etc.) (platform.openai.com)

Note from the general Models page:

  • These are categorized as “ChatGPT models” (models used in ChatGPT, not recommended for API use), and the docs list GPT‑5.1 as the generally recommended GPT‑5 family option for API work. (platform.openai.com)

Citations:


Verify that the description accurately reflects the model status.

Both gpt-5-chat-latest and gpt-5.1-chat-latest are valid OpenAI identifiers. However, the description 'OpenAI (GPT-5 latest)' on line 245 is misleading: gpt-5-chat-latest points to the GPT-5 snapshot previously used in ChatGPT, while gpt-5.1-chat-latest (line 246) points to the current GPT-5.1 snapshot actively used in ChatGPT.

Consider clarifying the description to distinguish the older snapshot from the current one, or ensure the configuration explicitly documents that gpt-5-chat-latest is a legacy option.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/config/index.mjs` around lines 245 - 246, Update the descriptions for the
two config entries to clearly distinguish the legacy GPT‑5 snapshot from the
current GPT‑5.1 snapshot: change the chatgptApi5Latest entry (symbol:
chatgptApi5Latest) to indicate it is a legacy/previous GPT‑5 snapshot (e.g.,
"OpenAI (GPT‑5 legacy snapshot)") and make chatgptApi5_1Latest (symbol:
chatgptApi5_1Latest) explicitly state it is the current GPT‑5.1 snapshot (e.g.,
"OpenAI (GPT‑5.1 latest snapshot)"); alternatively, add a short note in the
config comment documenting that chatgptApi5Latest is legacy.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates API-mode provider terminology across the extension to use “OpenAI” / “Anthropic” for API access (while keeping product names for web modes), and aligns internal function names and UI strings accordingly.

Changes:

  • Renames OpenAI API helper functions (generateAnswersWithChatgptApi*generateAnswersWithOpenAiApi*) and updates all call sites/tests.
  • Updates model group/model display descriptions for API providers (ChatGPT API → OpenAI API, Claude API → Anthropic API, Azure naming).
  • Updates UI + i18n strings for Anthropic API settings, including adding the missing “Anthropic API Key” locale entry.

Reviewed changes

Copilot reviewed 25 out of 25 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/services/apis/openai-api.mjs Renames exported OpenAI API functions to “OpenAi” terminology.
src/background/index.mjs Switches background execution path to call renamed OpenAI API function + updates related debug log.
src/services/apis/openrouter-api.mjs Updates OpenRouter wrapper to call renamed OpenAI-compat helper.
src/services/apis/aiml-api.mjs Updates AIML wrapper to call renamed OpenAI-compat helper.
src/services/apis/chatglm-api.mjs Updates ChatGLM wrapper to call renamed OpenAI-compat helper.
src/services/apis/deepseek-api.mjs Updates DeepSeek wrapper to call renamed OpenAI-compat helper.
src/services/apis/moonshot-api.mjs Updates Moonshot wrapper to call renamed OpenAI-compat helper.
src/services/apis/ollama-api.mjs Updates Ollama wrapper to call renamed OpenAI-compat helper.
src/popup/sections/AdvancedPart.jsx Updates UI label to “Custom Anthropic API Url”.
src/popup/sections/GeneralPart.jsx Updates Claude API key placeholder to “Anthropic API Key”.
src/config/index.mjs Updates API-mode model/group display names to OpenAI/Anthropic/Azure OpenAI wording.
tests/unit/services/apis/openai-api-compat.test.mjs Updates tests to use renamed OpenAI-compat function name.
src/_locales/en/main.json Adds “Anthropic API Key” and renames “Custom Claude API Url” → “Custom Anthropic API Url”.
src/_locales/de/main.json Same as above (German).
src/_locales/es/main.json Same as above (Spanish).
src/_locales/fr/main.json Same as above (French).
src/_locales/in/main.json Same as above (Indonesian).
src/_locales/it/main.json Same as above (Italian).
src/_locales/ja/main.json Same as above (Japanese).
src/_locales/ko/main.json Same as above (Korean).
src/_locales/pt/main.json Same as above (Portuguese).
src/_locales/ru/main.json Same as above (Russian).
src/_locales/tr/main.json Same as above (Turkish).
src/_locales/zh-hans/main.json Same as above (Simplified Chinese).
src/_locales/zh-hant/main.json Same as above (Traditional Chinese).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 587 to 589
} else if (isUsingClaudeApiModel(session)) {
console.debug('[background] Using Claude API Model')
await generateAnswersWithClaudeApi(port, session.question, session)
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The debug log still says "Using Claude API Model", which is inconsistent with the updated API provider naming in this PR (Anthropic for API mode). Consider renaming this log message to "Using Anthropic API Model" for consistency.

Copilot uses AI. Check for mistakes.
"Hide context menu of this extension": "Ocultar menú contextual de esta extensión",
"Custom Claude API Url": "URL personalizada de la API de Claude",
"Custom Anthropic API Url": "URL personalizada de la API de Anthropic",
"Anthropic API Key": "Anthropic API Key",
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This locale file translates "API Key" (see earlier entry), but the newly added "Anthropic API Key" value is left in English. Please localize it to match the rest of this locale.

Suggested change
"Anthropic API Key": "Anthropic API Key",
"Anthropic API Key": "Clave de API de Anthropic",

Copilot uses AI. Check for mistakes.
"Hide context menu of this extension": "Ocultar menu de contexto desta extensão",
"Custom Claude API Url": "URL da API Personalizada do Claude",
"Custom Anthropic API Url": "URL da API Personalizada do Anthropic",
"Anthropic API Key": "Anthropic API Key",
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This locale file translates "API Key" (see earlier entry), but the newly added "Anthropic API Key" value is left in English. Please localize it to match the rest of this locale.

Suggested change
"Anthropic API Key": "Anthropic API Key",
"Anthropic API Key": "Chave de API da Anthropic",

Copilot uses AI. Check for mistakes.
"Hide context menu of this extension": "Kontextmenü dieser Erweiterung ausblenden",
"Custom Claude API Url": "Benutzerdefinierte Claude-API-URL",
"Custom Anthropic API Url": "Benutzerdefinierte Anthropic-API-URL",
"Anthropic API Key": "Anthropic API Key",
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This locale file translates "API Key" (see earlier entry), but the newly added "Anthropic API Key" value is left in English. Please localize it to match the rest of this locale.

Suggested change
"Anthropic API Key": "Anthropic API Key",
"Anthropic API Key": "Anthropic-API-Schlüssel",

Copilot uses AI. Check for mistakes.
"Hide context menu of this extension": "Masquer le menu contextuel de cette extension",
"Custom Claude API Url": "URL API Claude personnalisée",
"Custom Anthropic API Url": "URL API Anthropic personnalisée",
"Anthropic API Key": "Anthropic API Key",
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This locale file translates "API Key" (see earlier entry), but the newly added "Anthropic API Key" value is left in English. Please localize it to match the rest of this locale.

Suggested change
"Anthropic API Key": "Anthropic API Key",
"Anthropic API Key": "Clé API Anthropic",

Copilot uses AI. Check for mistakes.
"Hide context menu of this extension": "Sembunyikan menu konteks ekstensi ini",
"Custom Claude API Url": "URL API Claude Kustom",
"Custom Anthropic API Url": "URL API Anthropic Kustom",
"Anthropic API Key": "Anthropic API Key",
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This locale file translates "API Key" (see earlier entry), but the newly added "Anthropic API Key" value is left in English. Please localize it to match the rest of this locale.

Suggested change
"Anthropic API Key": "Anthropic API Key",
"Anthropic API Key": "Kunci API Anthropic",

Copilot uses AI. Check for mistakes.
"Hide context menu of this extension": "Nascondi il menu contestuale di questa estensione",
"Custom Claude API Url": "URL API Claude personalizzato",
"Custom Anthropic API Url": "URL API Anthropic personalizzato",
"Anthropic API Key": "Anthropic API Key",
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This locale file translates "API Key" (see earlier entry), but the newly added "Anthropic API Key" value is left in English. Please localize it to match the rest of this locale.

Suggested change
"Anthropic API Key": "Anthropic API Key",
"Anthropic API Key": "Chiave API Anthropic",

Copilot uses AI. Check for mistakes.
"Hide context menu of this extension": "Скрыть контекстное меню этого расширения",
"Custom Claude API Url": "Пользовательский URL API Claude",
"Custom Anthropic API Url": "Пользовательский URL API Anthropic",
"Anthropic API Key": "Anthropic API Key",
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This locale file translates "API Key" (see earlier entry), but the newly added "Anthropic API Key" value is left in English. Please localize it to match the rest of this locale.

Suggested change
"Anthropic API Key": "Anthropic API Key",
"Anthropic API Key": "Ключ API Anthropic",

Copilot uses AI. Check for mistakes.
"Hide context menu of this extension": "Bu uzantının bağlam menüsünü gizle",
"Custom Claude API Url": "Özel Claude API Url'si",
"Custom Anthropic API Url": "Özel Anthropic API Url'si",
"Anthropic API Key": "Anthropic API Key",
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This locale file translates "API Key" (see earlier entry), but the newly added "Anthropic API Key" value is left in English. Please localize it to match the rest of this locale.

Suggested change
"Anthropic API Key": "Anthropic API Key",
"Anthropic API Key": "Anthropic API Anahtarı",

Copilot uses AI. Check for mistakes.
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request is a great step towards improving consistency by renaming LLM providers to use standard industry terminology for API access. The changes across the UI, internal functions, and locale files are well-executed. My main feedback is regarding the new locale strings, where the value for Anthropic API Key has been left untranslated in several language files. I've added specific comments with translation suggestions for each affected file.

"Hide context menu of this extension": "Kontextmenü dieser Erweiterung ausblenden",
"Custom Claude API Url": "Benutzerdefinierte Claude-API-URL",
"Custom Anthropic API Url": "Benutzerdefinierte Anthropic-API-URL",
"Anthropic API Key": "Anthropic API Key",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The value for the new locale string Anthropic API Key appears to be untranslated. It should be translated to German for consistency.

Suggested change
"Anthropic API Key": "Anthropic API Key",
"Anthropic API Key": "Anthropic API-Schlüssel",

"Hide context menu of this extension": "Ocultar menú contextual de esta extensión",
"Custom Claude API Url": "URL personalizada de la API de Claude",
"Custom Anthropic API Url": "URL personalizada de la API de Anthropic",
"Anthropic API Key": "Anthropic API Key",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The value for the new locale string Anthropic API Key appears to be untranslated. It should be translated to Spanish for consistency.

Suggested change
"Anthropic API Key": "Anthropic API Key",
"Anthropic API Key": "Clave de API de Anthropic",

"Hide context menu of this extension": "Masquer le menu contextuel de cette extension",
"Custom Claude API Url": "URL API Claude personnalisée",
"Custom Anthropic API Url": "URL API Anthropic personnalisée",
"Anthropic API Key": "Anthropic API Key",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The value for the new locale string Anthropic API Key appears to be untranslated. It should be translated to French for consistency.

Suggested change
"Anthropic API Key": "Anthropic API Key",
"Anthropic API Key": "Clé API Anthropic",

"Hide context menu of this extension": "Sembunyikan menu konteks ekstensi ini",
"Custom Claude API Url": "URL API Claude Kustom",
"Custom Anthropic API Url": "URL API Anthropic Kustom",
"Anthropic API Key": "Anthropic API Key",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The value for the new locale string Anthropic API Key appears to be untranslated. It should be translated to Indonesian for consistency.

Suggested change
"Anthropic API Key": "Anthropic API Key",
"Anthropic API Key": "Kunci API Anthropic",

"Hide context menu of this extension": "Nascondi il menu contestuale di questa estensione",
"Custom Claude API Url": "URL API Claude personalizzato",
"Custom Anthropic API Url": "URL API Anthropic personalizzato",
"Anthropic API Key": "Anthropic API Key",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The value for the new locale string Anthropic API Key appears to be untranslated. It should be translated to Italian for consistency.

Suggested change
"Anthropic API Key": "Anthropic API Key",
"Anthropic API Key": "Chiave API Anthropic",

"Hide context menu of this extension": "Ocultar menu de contexto desta extensão",
"Custom Claude API Url": "URL da API Personalizada do Claude",
"Custom Anthropic API Url": "URL da API Personalizada do Anthropic",
"Anthropic API Key": "Anthropic API Key",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The value for the new locale string Anthropic API Key appears to be untranslated. It should be translated to Portuguese for consistency.

Suggested change
"Anthropic API Key": "Anthropic API Key",
"Anthropic API Key": "Chave de API Anthropic",

"Hide context menu of this extension": "Скрыть контекстное меню этого расширения",
"Custom Claude API Url": "Пользовательский URL API Claude",
"Custom Anthropic API Url": "Пользовательский URL API Anthropic",
"Anthropic API Key": "Anthropic API Key",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The value for the new locale string Anthropic API Key appears to be untranslated. It should be translated to Russian for consistency.

Suggested change
"Anthropic API Key": "Anthropic API Key",
"Anthropic API Key": "API-ключ Anthropic",

"Hide context menu of this extension": "Bu uzantının bağlam menüsünü gizle",
"Custom Claude API Url": "Özel Claude API Url'si",
"Custom Anthropic API Url": "Özel Anthropic API Url'si",
"Anthropic API Key": "Anthropic API Key",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The value for the new locale string Anthropic API Key appears to be untranslated. It should be translated to Turkish for consistency.

Suggested change
"Anthropic API Key": "Anthropic API Key",
"Anthropic API Key": "Anthropic API Anahtarı",

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🧹 Nitpick comments (1)
src/_locales/en/main.json (1)

182-192: Claude Sonnet 4.6 (released Feb 17, 2026) is not included.

The locale keys cover up to Anthropic (API, Claude Opus 4.6) and Sonnet 4.5, but "Anthropic (API, Claude Sonnet 4.6)" — released on February 17, 2026, just five days before this PR — is absent. This gap applies to all locale files.

Do you want me to open a follow-up issue to track adding the Sonnet 4.6 entry?

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/_locales/en/main.json` around lines 182 - 192, Add the missing locale
entry for the newly released model by inserting the key "Anthropic (API, Claude
Sonnet 4.6)" with the same value into the locale JSONs (it should mirror
existing entries like "Anthropic (API, Claude Sonnet 4.5)"); update
src/_locales/en/main.json and propagate the identical key/value to all other
locale files to keep translations synchronized. Ensure the new key is placed in
the Anthropic block to maintain ordering and run a JSON lint/check to confirm no
trailing commas or syntax errors.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/_locales/en/main.json`:
- Line 164: The new localization key "Crop Text to ensure the input tokens do
not exceed the model's limit" was only added to en/main.json (and exists in
zh-hans/ and zh-hant/) but must be propagated to all other locale files; add
this exact key to each locale's main.json (de, es, fr, in, it, ja, ko, pt, ru,
tr) using either the proper translated string or the English text as a
placeholder, ensure valid JSON formatting (proper quoting, commas) and keep the
key/value identical in structure to the entry in en/main.json so automated
checks pass.

In `@src/_locales/fr/main.json`:
- Line 137: The JSON value for the key "Anthropic API Key" is still in English;
update its translated value to match the existing pattern used for "API Key"
(line with "Clé API") by replacing the English string with the French
translation, e.g., set the value to "Clé API Anthropic" for the "Anthropic API
Key" entry.

In `@src/_locales/in/main.json`:
- Line 137: The locale entry for the key "Anthropic API Key" has an untranslated
value (it currently duplicates the English key); update the value to the
Indonesian translation consistent with the existing pattern (e.g., use "Kunci
API Anthropic" or the same word order used elsewhere) so the pair becomes
"Anthropic API Key": "Kunci API Anthropic" (ensure the JSON string key stays
exactly "Anthropic API Key" and only the value is changed).

In `@src/_locales/pt/main.json`:
- Line 137: The translation value for the JSON key "Anthropic API Key" is still
in English; update its value to match the existing pattern used for "API Key"
(line with "Chave API") by replacing the English string with the Portuguese
translation, e.g., "Chave API Anthropic", so the entry becomes "Anthropic API
Key": "Chave API Anthropic".

In `@src/_locales/ru/main.json`:
- Line 137: The JSON entry with the key "Anthropic API Key" has an untranslated
value; update its value to the Russian equivalent consistent with the existing
"API Key" translation (use "Ключ API Anthropic" or "Ключ API для Anthropic") so
the entry reads "Anthropic API Key": "Ключ API Anthropic" (or "Ключ API для
Anthropic") to match the translation pattern used for "API Key".

In `@src/_locales/tr/main.json`:
- Line 137: The JSON entry with the key "Anthropic API Key" has an untranslated
value; update the value to the Turkish translation consistent with the existing
"API Key" translation (use "Anthropic API Anahtarı") so the pair reads
"Anthropic API Key": "Anthropic API Anahtarı" and matches the project's
translation pattern.

In `@src/_locales/zh-hans/main.json`:
- Line 170: Add the missing localization key "Thinking Content" into the source
locale en/main.json first (with its English value "Thinking Content"), then
propagate that key and corresponding translations to all other locale files
(including it, ja, ko, de, etc.) so no locale falls back to the raw key; update
zh-hans and zh-hant to remain consistent after propagation.

---

Duplicate comments:
In `@src/_locales/en/main.json`:
- Around line 136-137: The key "Custom Anthropic API Url" in en/main.json was
introduced by renaming the existing "Custom Claude API Url" which breaks the "Do
not change keys" rule; revert the original key "Custom Claude API Url" back to
its exact previous name and instead add a new separate entry for "Custom
Anthropic API Url" (and similarly restore "Anthropic API Key" if it replaced
"Claude API Key") so both keys coexist; update only the values if needed but do
not mutate existing key names (look for the string keys "Custom Claude API Url",
"Custom Anthropic API Url", "Claude API Key", and "Anthropic API Key" to locate
the changes).

In `@src/_locales/es/main.json`:
- Line 137: The Spanish translation file still has the English value for the
"Anthropic API Key" entry; update the value for the JSON key "Anthropic API Key"
in src/_locales/es/main.json to the Spanish translation (for example "Anthropic
Clave de API") so the key remains unchanged but the localized string is
translated.

In `@src/_locales/ja/main.json`:
- Line 137: The translation for the "Anthropic API Key" entry is inconsistent
with the existing "API Key" translation—remove the extra space so the value
becomes "Anthropic APIキー" to match the style used in the "API Key" -> "APIキー"
entry; update the value for the "Anthropic API Key" key accordingly (look for
the "Anthropic API Key" JSON property in main.json).

---

Nitpick comments:
In `@src/_locales/en/main.json`:
- Around line 182-192: Add the missing locale entry for the newly released model
by inserting the key "Anthropic (API, Claude Sonnet 4.6)" with the same value
into the locale JSONs (it should mirror existing entries like "Anthropic (API,
Claude Sonnet 4.5)"); update src/_locales/en/main.json and propagate the
identical key/value to all other locale files to keep translations synchronized.
Ensure the new key is placed in the Anthropic block to maintain ordering and run
a JSON lint/check to confirm no trailing commas or syntax errors.

@PeterDaveHello PeterDaveHello force-pushed the rename-llm-provider-names branch from 0ac6a6e to 7e1ad20 Compare February 23, 2026 06:07
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
src/background/index.mjs (1)

584-589: Log messages correctly updated; minor naming inconsistency with the guard function.

The console.debug and call-site changes are correct and intentional. However, the guard at Line 584 is still isUsingChatgptApiModel while the log now reads "Using OpenAI API Model". The function is not renamed in this PR (unlike generateAnswersWithChatgptApigenerateAnswersWithOpenAiApi), creating a semantic gap that could confuse future readers. Consider renaming it — noting that isUsingOpenAiApiModel (Line 668 of config/index.mjs) already exists as the broader union function, so the renamed version would need a distinct name like isUsingOpenAiChatCompletionApiModel.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/background/index.mjs` around lines 584 - 589, The guard function name is
inconsistent with the new OpenAI naming: change the predicate
isUsingChatgptApiModel to a clearer name like
isUsingOpenAiChatCompletionApiModel (or similar) and update all call sites
(e.g., the conditional that now logs "Using OpenAI API Model" and calls
generateAnswersWithOpenAiApi) to use the new name; also update its
export/imports and any references alongside the existing isUsingOpenAiApiModel
union so there’s no ambiguity.
src/_locales/pt/main.json (1)

73-78: Stale model description keys after the ChatGPT → OpenAI rename.

Lines 76–78 ("ChatGPT (GPT-3.5-turbo)", "ChatGPT (GPT-4-8k)", "ChatGPT (GPT-4-32k)") are now unreachable — src/config/index.mjs changed those desc values to "OpenAI (GPT-3.5-turbo)", "OpenAI (GPT-4-8k)", etc. Leaving them in the file is harmless (i18next falls back to the key for unmapped strings), but they're dead weight.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/_locales/pt/main.json` around lines 73 - 78, The JSON contains stale
localization keys using "ChatGPT (...)" that no longer map to any description in
src/config/index.mjs (which now uses "OpenAI (...)" values); remove the dead
entries for "ChatGPT (GPT-3.5-turbo)", "ChatGPT (GPT-4-8k)", and "ChatGPT
(GPT-4-32k)" from src/_locales/pt/main.json or replace them with the updated
keys "OpenAI (GPT-3.5-turbo)", "OpenAI (GPT-4-8k)", and "OpenAI (GPT-4-32k)" so
the locale file matches the desc values used by the application.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/_locales/it/main.json`:
- Line 137: The value for the JSON key "Anthropic API Key" is untranslated;
update its value to the Italian translation following the existing pattern used
for "API Key" (e.g., "Chiave API Anthropic" or "Chiave API di Anthropic") so the
entry becomes "Anthropic API Key": "Chiave API Anthropic" (or your chosen
Italian variant) in src/_locales/it/main.json.

---

Duplicate comments:
In `@src/_locales/fr/main.json`:
- Line 137: The French value for the "Anthropic API Key" entry is still in
English; update the value for the "Anthropic API Key" key to a proper French
translation (e.g., "Clé API Anthropic" or "Clé API pour Anthropic") to match the
existing translation style used for the "API Key" key.

In `@src/_locales/pt/main.json`:
- Line 137: The localization value for the key "Anthropic API Key" is
untranslated; update its value to Portuguese while keeping the product name
"Anthropic" intact (e.g., change the value to "Chave API Anthropic" to match the
existing "API Key": "Chave API" pattern), ensuring punctuation/quotes remain
unchanged.

In `@src/_locales/ru/main.json`:
- Line 137: The JSON entry with key "Anthropic API Key" currently has an English
value; replace its value with the Russian translation matching the project's
convention (use "Ключ API Anthropic" or similar), ensuring the key remains
unchanged ("Anthropic API Key") and the value is properly quoted to keep valid
JSON in main.json.

In `@src/config/index.mjs`:
- Around line 245-246: The two config entries chatgptApi5Latest and
chatgptApi5_1Latest are labeled as "latest" but are snapshots/legacy (GPT‑5.2 is
now current); update their desc fields to remove "latest" and clearly mark them
as snapshot/legacy/deprecated (e.g., "OpenAI (GPT‑5 snapshot, legacy)" and
"OpenAI (GPT‑5.1 snapshot, legacy)") so the UI/config no longer misleads; keep
the value fields the same but ensure descriptions for chatgptApi5Latest and
chatgptApi5_1Latest reflect they are not the current flagship model.

---

Nitpick comments:
In `@src/_locales/pt/main.json`:
- Around line 73-78: The JSON contains stale localization keys using "ChatGPT
(...)" that no longer map to any description in src/config/index.mjs (which now
uses "OpenAI (...)" values); remove the dead entries for "ChatGPT
(GPT-3.5-turbo)", "ChatGPT (GPT-4-8k)", and "ChatGPT (GPT-4-32k)" from
src/_locales/pt/main.json or replace them with the updated keys "OpenAI
(GPT-3.5-turbo)", "OpenAI (GPT-4-8k)", and "OpenAI (GPT-4-32k)" so the locale
file matches the desc values used by the application.

In `@src/background/index.mjs`:
- Around line 584-589: The guard function name is inconsistent with the new
OpenAI naming: change the predicate isUsingChatgptApiModel to a clearer name
like isUsingOpenAiChatCompletionApiModel (or similar) and update all call sites
(e.g., the conditional that now logs "Using OpenAI API Model" and calls
generateAnswersWithOpenAiApi) to use the new name; also update its
export/imports and any references alongside the existing isUsingOpenAiApiModel
union so there’s no ambiguity.

@PeterDaveHello
Copy link
Member Author

@codex review

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 25 out of 25 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7e1ad20122

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


chatgptApi35: { value: 'gpt-3.5-turbo', desc: 'ChatGPT (GPT-3.5-turbo)' },
chatgptApi35_16k: { value: 'gpt-3.5-turbo-16k', desc: 'ChatGPT (GPT-3.5-turbo-16k)' },
chatgptApi35: { value: 'gpt-3.5-turbo', desc: 'OpenAI (GPT-3.5-turbo)' },

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add translations for renamed OpenAI model descriptor keys

Renaming model descriptors like ChatGPT (GPT-3.5-turbo) to OpenAI (GPT-3.5-turbo) changes the i18n lookup keys used by UI paths that render t(desc) (e.g., model selectors in popup/menu), but the locale files were not updated with these new keys. In non-English locales this regresses previously translated labels to raw English fallback (for example, src/_locales/ru/main.json still only defines the old ChatGPT (...) keys), so users lose localization for several existing model options.

Useful? React with 👍 / 👎.

@PeterDaveHello PeterDaveHello changed the title Fix: Correct LLM provider naming for API modes Correct LLM provider naming for OpenAI/Anthropic API modes Feb 24, 2026
- ChatGPT (API) -> OpenAI (API)
- ChatGPT (Azure API) -> Azure OpenAI (API)
- Claude.ai (API) -> Anthropic (API)
- Rename generateAnswersWithChatgptApi -> generateAnswersWithOpenAiApi
- Rename config keys: claudeApiKey -> anthropicApiKey, customClaudeApiUrl -> customAnthropicApiUrl
- Add migration logic for existing user settings
- Add localized translations for 'Anthropic API Key'

OpenAI and Anthropic are the commonly used terms for API access.
Product names like ChatGPT and Claude are appropriate for web
interfaces, but less precise for API settings.
@PeterDaveHello
Copy link
Member Author

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Hooray!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 26 out of 26 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +740 to +743
// Always migrate if old key exists to handle import of legacy backups
if (options.claudeApiKey !== undefined) {
options.anthropicApiKey = options.claudeApiKey
await Browser.storage.local.set({ anthropicApiKey: options.claudeApiKey })
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The migration overwrites anthropicApiKey unconditionally whenever the legacy claudeApiKey key exists. If a user ends up with both keys present (e.g., after importing an old backup on a newer install), this can clobber the newer value. Prefer migrating only when anthropicApiKey is missing/empty, or otherwise keep the newer key and just remove the legacy one.

Suggested change
// Always migrate if old key exists to handle import of legacy backups
if (options.claudeApiKey !== undefined) {
options.anthropicApiKey = options.claudeApiKey
await Browser.storage.local.set({ anthropicApiKey: options.claudeApiKey })
// Only backfill anthropicApiKey from claudeApiKey if the new key is missing/empty
if (options.claudeApiKey !== undefined) {
const hasAnthropicApiKey =
options.anthropicApiKey !== undefined &&
options.anthropicApiKey !== null &&
options.anthropicApiKey !== ''
if (!hasAnthropicApiKey) {
options.anthropicApiKey = options.claudeApiKey
await Browser.storage.local.set({ anthropicApiKey: options.claudeApiKey })
}

Copilot uses AI. Check for mistakes.
Comment on lines +747 to +748
options.customAnthropicApiUrl = options.customClaudeApiUrl
await Browser.storage.local.set({ customAnthropicApiUrl: options.customClaudeApiUrl })
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue for the custom URL migration: if both customAnthropicApiUrl and legacy customClaudeApiUrl are present in storage, this logic will overwrite the newer URL. Consider only migrating when the new key is not set (or keep the new value and only remove the legacy key).

Suggested change
options.customAnthropicApiUrl = options.customClaudeApiUrl
await Browser.storage.local.set({ customAnthropicApiUrl: options.customClaudeApiUrl })
// Only migrate URL if new key is not already set; otherwise keep the newer value
if (options.customAnthropicApiUrl === undefined) {
options.customAnthropicApiUrl = options.customClaudeApiUrl
await Browser.storage.local.set({
customAnthropicApiUrl: options.customClaudeApiUrl,
})
}

Copilot uses AI. Check for mistakes.
Comment on lines +739 to +744
// Migrate old keys to new names (persist new keys before removing old ones)
// Always migrate if old key exists to handle import of legacy backups
if (options.claudeApiKey !== undefined) {
options.anthropicApiKey = options.claudeApiKey
await Browser.storage.local.set({ anthropicApiKey: options.claudeApiKey })
await Browser.storage.local.remove('claudeApiKey')
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New storage migration behavior was added for claudeApiKey/customClaudeApiUrl, but there are existing unit tests for getUserConfig migrations (e.g., the chat.openai.com -> chatgpt.com URL case). Please add tests covering the new key migrations (including that the old keys are removed and the new keys are set, and that newer keys are not overwritten when both exist).

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
src/config/index.mjs (1)

245-246: Existing concern: 'OpenAI (GPT-5 latest)' description may still mislead.

gpt-5-chat-latest resolves to the previous GPT-5 ChatGPT snapshot, while gpt-5.1-chat-latest (line 246) is the more current one. Calling both "latest" without qualification can confuse users choosing between the two.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/config/index.mjs` around lines 245 - 246, The descriptions for
chatgptApi5Latest and chatgptApi5_1Latest are misleading; update the desc for
chatgptApi5Latest to indicate it refers to the previous/legacy GPT‑5 snapshot
(e.g., "OpenAI (GPT‑5 previous snapshot / legacy)") and make chatgptApi5_1Latest
explicitly "OpenAI (GPT‑5.1 latest/current)" so users can distinguish which
entry is the current model; locate the two config entries named
chatgptApi5Latest and chatgptApi5_1Latest and change only their desc strings
accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@src/config/index.mjs`:
- Around line 245-246: The descriptions for chatgptApi5Latest and
chatgptApi5_1Latest are misleading; update the desc for chatgptApi5Latest to
indicate it refers to the previous/legacy GPT‑5 snapshot (e.g., "OpenAI (GPT‑5
previous snapshot / legacy)") and make chatgptApi5_1Latest explicitly "OpenAI
(GPT‑5.1 latest/current)" so users can distinguish which entry is the current
model; locate the two config entries named chatgptApi5Latest and
chatgptApi5_1Latest and change only their desc strings accordingly.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7e1ad20 and 59f5b50.

📒 Files selected for processing (26)
  • src/_locales/de/main.json
  • src/_locales/en/main.json
  • src/_locales/es/main.json
  • src/_locales/fr/main.json
  • src/_locales/in/main.json
  • src/_locales/it/main.json
  • src/_locales/ja/main.json
  • src/_locales/ko/main.json
  • src/_locales/pt/main.json
  • src/_locales/ru/main.json
  • src/_locales/tr/main.json
  • src/_locales/zh-hans/main.json
  • src/_locales/zh-hant/main.json
  • src/background/index.mjs
  • src/config/index.mjs
  • src/popup/sections/AdvancedPart.jsx
  • src/popup/sections/GeneralPart.jsx
  • src/services/apis/aiml-api.mjs
  • src/services/apis/chatglm-api.mjs
  • src/services/apis/claude-api.mjs
  • src/services/apis/deepseek-api.mjs
  • src/services/apis/moonshot-api.mjs
  • src/services/apis/ollama-api.mjs
  • src/services/apis/openai-api.mjs
  • src/services/apis/openrouter-api.mjs
  • tests/unit/services/apis/openai-api-compat.test.mjs
🚧 Files skipped from review as they are similar to previous changes (16)
  • src/services/apis/chatglm-api.mjs
  • src/popup/sections/AdvancedPart.jsx
  • src/services/apis/deepseek-api.mjs
  • src/background/index.mjs
  • src/_locales/ja/main.json
  • src/_locales/ru/main.json
  • src/_locales/en/main.json
  • src/_locales/it/main.json
  • src/_locales/de/main.json
  • src/_locales/pt/main.json
  • src/_locales/ko/main.json
  • src/_locales/es/main.json
  • src/_locales/fr/main.json
  • src/_locales/in/main.json
  • src/_locales/tr/main.json
  • src/services/apis/ollama-api.mjs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant