Correct LLM provider naming for OpenAI/Anthropic API modes#928
Correct LLM provider naming for OpenAI/Anthropic API modes#928PeterDaveHello merged 1 commit intomasterfrom
Conversation
📝 WalkthroughWalkthroughThis PR renames Claude API references to Anthropic throughout the codebase, expands model catalogs to include numerous OpenAI and Anthropic variants, refactors OpenAI API function names for consistency, and implements legacy configuration key migration to support the Claude-to-Anthropic naming transition. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant GeneralPart as GeneralPart.jsx
participant Cleanup as import-data-cleanup
participant Storage as Browser.storage.local
User->>GeneralPart: Import data (click button)
GeneralPart->>Cleanup: importDataIntoStorage(storage, data)
Cleanup->>Cleanup: prepareImportData(data)<br/>Normalize claude* → anthropic*<br/>Mark legacy keys for removal
Cleanup->>Storage: set(normalizedData)
Storage-->>Cleanup: Success
Cleanup->>Storage: remove(legacyKeys)
Storage-->>Cleanup: Success
Cleanup-->>GeneralPart: Complete
GeneralPart->>User: Reload page
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||
Summary of ChangesHello @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
🧠 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
Activity
Using Gemini Code AssistThe 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
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 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
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||
There was a problem hiding this comment.
💡 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)' }, |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
Actionable comments posted: 6
🧹 Nitpick comments (5)
src/services/apis/openai-api.mjs (1)
17-17:generateAnswersWithGptCompletionApinot aligned with the new OpenAI naming convention.The rest of the file now uses
generateAnswersWithOpenAi*prefixes, but this legacy completions endpoint function still carries theGptprefix, which is inconsistent. Consider renaming togenerateAnswersWithOpenAiGptCompletionApiorgenerateAnswersWithOpenAiCompletionApifor 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 stringclaude-sonnet-4-5-20250929.As a pre-existing side-note (not introduced by this PR):
claudeOpus45ApiandclaudeOpus46Apiuse undated bare identifiers (claude-opus-4-5,claude-opus-4-6), which can producemodel_not_founderrors 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).
| "Custom Anthropic API Url": "Custom Anthropic API Url", | ||
| "Anthropic API Key": "Anthropic API Key", |
There was a problem hiding this comment.
🧩 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": "この拡張機能のコンテキストメニューを非表示", | ||
| "Custom Claude API Url": "カスタムClaude APIのURL", | ||
| "Custom Anthropic API Url": "カスタムAnthropic APIのURL", | ||
| "Anthropic API Key": "Anthropic API キー", |
There was a problem hiding this comment.
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.
| "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.
| } 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) |
There was a problem hiding this comment.
🧩 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.mjsRepository: 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.mjsRepository: 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.mjsRepository: 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).
There was a problem hiding this comment.
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.
| } else if (isUsingClaudeApiModel(session)) { | ||
| console.debug('[background] Using Claude API Model') | ||
| await generateAnswersWithClaudeApi(port, session.question, session) |
There was a problem hiding this comment.
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.
0ac6a6e to
7e1ad20
Compare
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
💡 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)' }, |
There was a problem hiding this comment.
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 👍 / 👎.
7e1ad20 to
59f5b50
Compare
|
Codex Review: Didn't find any major issues. Hooray! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
There was a problem hiding this comment.
♻️ Duplicate comments (1)
src/config/index.mjs (1)
245-246: Existing concern:'OpenAI (GPT-5 latest)'description may still mislead.
gpt-5-chat-latestresolves to the previous GPT-5 ChatGPT snapshot, whilegpt-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
📒 Files selected for processing (26)
src/_locales/de/main.jsonsrc/_locales/en/main.jsonsrc/_locales/es/main.jsonsrc/_locales/fr/main.jsonsrc/_locales/in/main.jsonsrc/_locales/it/main.jsonsrc/_locales/ja/main.jsonsrc/_locales/ko/main.jsonsrc/_locales/pt/main.jsonsrc/_locales/ru/main.jsonsrc/_locales/tr/main.jsonsrc/_locales/zh-hans/main.jsonsrc/_locales/zh-hant/main.jsonsrc/background/index.mjssrc/config/index.mjssrc/popup/sections/AdvancedPart.jsxsrc/popup/sections/GeneralPart.jsxsrc/services/apis/aiml-api.mjssrc/services/apis/chatglm-api.mjssrc/services/apis/claude-api.mjssrc/services/apis/deepseek-api.mjssrc/services/apis/moonshot-api.mjssrc/services/apis/ollama-api.mjssrc/services/apis/openai-api.mjssrc/services/apis/openrouter-api.mjstests/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
59f5b50 to
8751568
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 29 out of 29 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.
There was a problem hiding this comment.
♻️ Duplicate comments (4)
src/_locales/en/main.json (2)
166-166:⚠️ Potential issue | 🟡 MinorPropagate the changed crop-text string to all locales.
The changed source string is missing from the provided locale files (
src/_locales/pt/main.json,src/_locales/ko/main.json,src/_locales/es/main.json,src/_locales/it/main.json), so those locales will fall back to raw keys.As per coding guidelines:
src/_locales/en/main.json: Do not change keys insrc/_locales/en/main.json; add new strings toen/main.jsonfirst, then propagate to other locales.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/_locales/en/main.json` at line 166, The English locale string "Crop Text to ensure the input tokens do not exceed the model's limit" was updated but not propagated; add the same key to the other locale files (pt, ko, es, it) with appropriate translated values (do not change existing en keys), ensuring each locale's main.json includes that exact key and a translated string so they no longer fall back to raw keys.
138-139:⚠️ Potential issue | 🟡 MinorDo not rename source-locale keys in
en/main.json.
"Custom Anthropic API Url"replaces the prior source key pattern, which breaks the repository i18n compatibility rule. Keep the old key and add the new key alongside it.As per coding guidelines: `src/_locales/en/main.json`: Do not change keys in `src/_locales/en/main.json`; add new strings to `en/main.json` first, then propagate to other locales.🔧 Suggested compatibility-safe shape
+ "Custom Claude API Url": "Custom Claude API Url", "Custom Anthropic API Url": "Custom Anthropic API Url",🤖 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 138 - 139, Revert the rename: do not remove or change the existing source-locale key that was replaced—keep that original key intact in en/main.json, add the new "Custom Anthropic API Url" key alongside it (with its value), and ensure "Anthropic API Key" remains unchanged; in short, restore the original source key, add the new key as an additional entry, and leave en/main.json's source keys untouched so other locales can be safely updated later.src/_locales/zh-hans/main.json (1)
172-172:⚠️ Potential issue | 🟠 Major
Thinking Contentis added out of i18n source order.This key is introduced in
zh-hansbut is not present insrc/_locales/en/main.json(source locale) and not propagated across the provided locales. Add it to en first, then propagate.As per coding guidelines:
src/_locales/en/main.json: Do not change keys insrc/_locales/en/main.json; add new strings toen/main.jsonfirst, then propagate to other locales.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/_locales/zh-hans/main.json` at line 172, The new i18n key "Thinking Content" was added directly to zh-hans out of source order; add the key and its English value to the source locale main.json (create the "Thinking Content" entry in en with the appropriate English string), then propagate the same key to all other locale files including zh-hans to keep translations in sync; ensure you do not modify existing en keys, only add this new entry to en first and then copy/update other locale files.src/_locales/ja/main.json (1)
139-139:⚠️ Potential issue | 🟡 MinorMinor spacing inconsistency in Japanese translation.
"Anthropic API キー"has a space beforeキー, while the existing"API Key": "APIキー"(line 87) has no space. Consider aligning to"Anthropic APIキー"for consistency.🛠️ Suggested fix
- "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 139, The translation for the JSON key "Anthropic API Key" currently uses a space ("Anthropic API キー"); update its value to remove the space and match the existing style used by "API Key" — i.e., set the value to "Anthropic APIキー" so the mapping "Anthropic API Key": "Anthropic APIキー" is consistent with "API Key": "APIキー".
🧹 Nitpick comments (1)
src/config/index.mjs (1)
742-753: Drop legacy keys from returnedoptionsafter migration.Storage cleanup is done, but the current in-memory object can still carry
claudeApiKey/customClaudeApiUrlin that same call. Deleting them keepsgetUserConfig()shape consistent.♻️ Suggested patch
if (options.claudeApiKey !== undefined) { options.anthropicApiKey = options.claudeApiKey await Browser.storage.local.set({ anthropicApiKey: options.claudeApiKey }) await Browser.storage.local.remove('claudeApiKey') + delete options.claudeApiKey } if (options.customClaudeApiUrl !== undefined) { options.customAnthropicApiUrl = options.customClaudeApiUrl await Browser.storage.local.set({ customAnthropicApiUrl: options.customClaudeApiUrl }) await Browser.storage.local.remove('customClaudeApiUrl') + delete options.customClaudeApiUrl } return defaults(options, defaultConfig)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/config/index.mjs` around lines 742 - 753, After migrating storage keys (claudeApiKey -> anthropicApiKey and customClaudeApiUrl -> customAnthropicApiUrl) you must also remove the legacy keys from the in-memory options object so getUserConfig() returns a consistent shape; update the block that currently sets options.anthropicApiKey and options.customAnthropicApiUrl to also delete options.claudeApiKey and options.customClaudeApiUrl (or omit them via a new object) before calling defaults(options, defaultConfig) so the returned object no longer contains the legacy properties.
🤖 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/_locales/en/main.json`:
- Line 166: The English locale string "Crop Text to ensure the input tokens do
not exceed the model's limit" was updated but not propagated; add the same key
to the other locale files (pt, ko, es, it) with appropriate translated values
(do not change existing en keys), ensuring each locale's main.json includes that
exact key and a translated string so they no longer fall back to raw keys.
- Around line 138-139: Revert the rename: do not remove or change the existing
source-locale key that was replaced—keep that original key intact in
en/main.json, add the new "Custom Anthropic API Url" key alongside it (with its
value), and ensure "Anthropic API Key" remains unchanged; in short, restore the
original source key, add the new key as an additional entry, and leave
en/main.json's source keys untouched so other locales can be safely updated
later.
In `@src/_locales/ja/main.json`:
- Line 139: The translation for the JSON key "Anthropic API Key" currently uses
a space ("Anthropic API キー"); update its value to remove the space and match the
existing style used by "API Key" — i.e., set the value to "Anthropic APIキー" so
the mapping "Anthropic API Key": "Anthropic APIキー" is consistent with "API Key":
"APIキー".
In `@src/_locales/zh-hans/main.json`:
- Line 172: The new i18n key "Thinking Content" was added directly to zh-hans
out of source order; add the key and its English value to the source locale
main.json (create the "Thinking Content" entry in en with the appropriate
English string), then propagate the same key to all other locale files including
zh-hans to keep translations in sync; ensure you do not modify existing en keys,
only add this new entry to en first and then copy/update other locale files.
---
Nitpick comments:
In `@src/config/index.mjs`:
- Around line 742-753: After migrating storage keys (claudeApiKey ->
anthropicApiKey and customClaudeApiUrl -> customAnthropicApiUrl) you must also
remove the legacy keys from the in-memory options object so getUserConfig()
returns a consistent shape; update the block that currently sets
options.anthropicApiKey and options.customAnthropicApiUrl to also delete
options.claudeApiKey and options.customClaudeApiUrl (or omit them via a new
object) before calling defaults(options, defaultConfig) so the returned object
no longer contains the legacy properties.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (29)
PR.mdsrc/_locales/de/main.jsonsrc/_locales/en/main.jsonsrc/_locales/es/main.jsonsrc/_locales/fr/main.jsonsrc/_locales/in/main.jsonsrc/_locales/it/main.jsonsrc/_locales/ja/main.jsonsrc/_locales/ko/main.jsonsrc/_locales/pt/main.jsonsrc/_locales/ru/main.jsonsrc/_locales/tr/main.jsonsrc/_locales/zh-hans/main.jsonsrc/_locales/zh-hant/main.jsonsrc/background/index.mjssrc/config/index.mjssrc/popup/sections/AdvancedPart.jsxsrc/popup/sections/GeneralPart.jsxsrc/services/apis/aiml-api.mjssrc/services/apis/chatglm-api.mjssrc/services/apis/claude-api.mjssrc/services/apis/deepseek-api.mjssrc/services/apis/moonshot-api.mjssrc/services/apis/ollama-api.mjssrc/services/apis/openai-api.mjssrc/services/apis/openrouter-api.mjstests/setup/browser-shim.mjstests/unit/config/user-config.test.mjstests/unit/services/apis/openai-api-compat.test.mjs
🚧 Files skipped from review as they are similar to previous changes (8)
- src/popup/sections/AdvancedPart.jsx
- src/services/apis/claude-api.mjs
- src/services/apis/ollama-api.mjs
- src/services/apis/aiml-api.mjs
- src/services/apis/openai-api.mjs
- src/services/apis/deepseek-api.mjs
- src/background/index.mjs
- src/services/apis/chatglm-api.mjs
|
Codex Review: Didn't find any major issues. Another round soon, please! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
8751568 to
b5ecddd
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 32 out of 32 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.
|
Codex Review: Didn't find any major issues. Can't wait for the next one! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
b5ecddd to
f57cd55
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 33 out of 33 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
PR.md
Outdated
| ## 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 Url` → `Custom Anthropic API Url` | ||
| - Add `Anthropic API Key` with translations in all 13 locales | ||
|
|
||
| **Internal Code:** | ||
| - Rename `generateAnswersWithChatgptApi` → `generateAnswersWithOpenAiApi` | ||
| - Rename `generateAnswersWithChatgptApiCompat` → `generateAnswersWithOpenAiApiCompat` | ||
|
|
||
| **Config Keys:** | ||
| - `claudeApiKey` → `anthropicApiKey` | ||
| - `customClaudeApiUrl` → `customAnthropicApiUrl` | ||
| - 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. |
|
Codex Review: Didn't find any major issues. Swish! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Standardize provider naming in the UI and codebase so OpenAI API, Anthropic API, and Azure OpenAI use consistent API-facing terminology, while ChatGPT and Claude remain the web product names. Update related locale strings, config keys, and migration handling to preserve existing settings and avoid duplicate API markers in custom deployment labels.
f57cd55 to
c8645f8
Compare
There was a problem hiding this comment.
♻️ Duplicate comments (2)
src/_locales/en/main.json (2)
137-138:⚠️ Potential issue | 🟠 MajorDo not replace an existing localization key in
en/main.json; add the new key alongside it.Line 137 should not remove/rename the existing
"Custom Claude API Url"key. Keep the original key for compatibility and add"Custom Anthropic API Url"as an additional key.Suggested minimal fix
+ "Custom Claude API Url": "Custom Claude API Url", "Custom Anthropic API Url": "Custom Anthropic API Url", "Anthropic API Key": "Anthropic API Key",As per coding guidelines:
src/_locales/**/*.json: "Do not change existing localization keys insrc/_locales/en/main.json; only add new keys; new strings must first be added to en/main.json before propagating to other locales".🤖 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 137 - 138, The existing localization key "Custom Claude API Url" was replaced instead of preserved; restore that original key and add the new key "Custom Anthropic API Url" alongside it in en main.json (do not rename or remove "Custom Claude API Url"), ensuring both "Custom Claude API Url" and "Custom Anthropic API Url" appear as separate entries so the new string is added without altering the existing key.
165-165:⚠️ Potential issue | 🟡 MinorPropagate the new crop-text key to all locale files updated in this PR.
Line 165 adds a new en key, but this key is missing from the provided updated locale files (
src/_locales/in/main.json,src/_locales/pt/main.json,src/_locales/fr/main.json,src/_locales/ko/main.json).As per coding guidelines:
src/_locales/**/*.json: "new strings must first be added to en/main.json before propagating to other locales".🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/_locales/en/main.json` at line 165, The new localization key "Crop Text to ensure the input tokens do not exceed the model's limit" was added to en/main.json but not propagated to the other updated locale files; add this exact key with appropriate translated (or placeholder) value to each locale JSON touched in this PR so all locales include the same key; ensure the key string matches exactly and validate the JSON after editing.
🤖 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/_locales/en/main.json`:
- Around line 137-138: The existing localization key "Custom Claude API Url" was
replaced instead of preserved; restore that original key and add the new key
"Custom Anthropic API Url" alongside it in en main.json (do not rename or remove
"Custom Claude API Url"), ensuring both "Custom Claude API Url" and "Custom
Anthropic API Url" appear as separate entries so the new string is added without
altering the existing key.
- Line 165: The new localization key "Crop Text to ensure the input tokens do
not exceed the model's limit" was added to en/main.json but not propagated to
the other updated locale files; add this exact key with appropriate translated
(or placeholder) value to each locale JSON touched in this PR so all locales
include the same key; ensure the key string matches exactly and validate the
JSON after editing.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 4b7f3d6b-60c0-476b-9ba7-ba3a0a025082
📒 Files selected for processing (33)
PR.mdsrc/_locales/de/main.jsonsrc/_locales/en/main.jsonsrc/_locales/es/main.jsonsrc/_locales/fr/main.jsonsrc/_locales/in/main.jsonsrc/_locales/it/main.jsonsrc/_locales/ja/main.jsonsrc/_locales/ko/main.jsonsrc/_locales/pt/main.jsonsrc/_locales/ru/main.jsonsrc/_locales/tr/main.jsonsrc/_locales/zh-hans/main.jsonsrc/_locales/zh-hant/main.jsonsrc/background/index.mjssrc/config/index.mjssrc/popup/sections/AdvancedPart.jsxsrc/popup/sections/GeneralPart.jsxsrc/popup/sections/import-data-cleanup.mjssrc/services/apis/aiml-api.mjssrc/services/apis/chatglm-api.mjssrc/services/apis/claude-api.mjssrc/services/apis/deepseek-api.mjssrc/services/apis/moonshot-api.mjssrc/services/apis/ollama-api.mjssrc/services/apis/openai-api.mjssrc/services/apis/openrouter-api.mjssrc/utils/model-name-convert.mjstests/setup/browser-shim.mjstests/unit/config/user-config.test.mjstests/unit/popup/import-data-cleanup.test.mjstests/unit/services/apis/openai-api-compat.test.mjstests/unit/utils/model-name-convert.test.mjs
🚧 Files skipped from review as they are similar to previous changes (9)
- src/services/apis/claude-api.mjs
- src/services/apis/chatglm-api.mjs
- src/popup/sections/AdvancedPart.jsx
- src/background/index.mjs
- src/services/apis/openrouter-api.mjs
- src/services/apis/ollama-api.mjs
- src/_locales/ru/main.json
- src/_locales/ja/main.json
- src/services/apis/aiml-api.mjs
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 32 out of 32 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.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/popup/sections/import-data-cleanup.mjs`:
- Around line 26-34: The importDataIntoStorage function currently awaits
storageArea.set and storageArea.remove but doesn't handle errors; wrap those
calls in a try-catch inside importDataIntoStorage (around prepareImportData
usage and the await storageArea.set(...) / await storageArea.remove(...)) and in
the catch block log the error with context (include normalizedData and
keysToRemove) using console.error, then rethrow the error; additionally update
the caller in GeneralPart.jsx to wrap its call to importDataIntoStorage(...) in
a try-catch and show a user-facing error (e.g., toast/alert) so quota/remove
failures are surfaced to the user.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 3d28ba9c-7d24-48e1-b0c1-fdebc24c38b4
📒 Files selected for processing (32)
src/_locales/de/main.jsonsrc/_locales/en/main.jsonsrc/_locales/es/main.jsonsrc/_locales/fr/main.jsonsrc/_locales/in/main.jsonsrc/_locales/it/main.jsonsrc/_locales/ja/main.jsonsrc/_locales/ko/main.jsonsrc/_locales/pt/main.jsonsrc/_locales/ru/main.jsonsrc/_locales/tr/main.jsonsrc/_locales/zh-hans/main.jsonsrc/_locales/zh-hant/main.jsonsrc/background/index.mjssrc/config/index.mjssrc/popup/sections/AdvancedPart.jsxsrc/popup/sections/GeneralPart.jsxsrc/popup/sections/import-data-cleanup.mjssrc/services/apis/aiml-api.mjssrc/services/apis/chatglm-api.mjssrc/services/apis/claude-api.mjssrc/services/apis/deepseek-api.mjssrc/services/apis/moonshot-api.mjssrc/services/apis/ollama-api.mjssrc/services/apis/openai-api.mjssrc/services/apis/openrouter-api.mjssrc/utils/model-name-convert.mjstests/setup/browser-shim.mjstests/unit/config/user-config.test.mjstests/unit/popup/import-data-cleanup.test.mjstests/unit/services/apis/openai-api-compat.test.mjstests/unit/utils/model-name-convert.test.mjs
🚧 Files skipped from review as they are similar to previous changes (12)
- src/services/apis/chatglm-api.mjs
- src/services/apis/openai-api.mjs
- tests/unit/config/user-config.test.mjs
- tests/setup/browser-shim.mjs
- src/services/apis/ollama-api.mjs
- src/popup/sections/AdvancedPart.jsx
- src/services/apis/deepseek-api.mjs
- src/utils/model-name-convert.mjs
- src/services/apis/openrouter-api.mjs
- src/services/apis/claude-api.mjs
- src/popup/sections/GeneralPart.jsx
- src/services/apis/aiml-api.mjs
User description
Summary
Standardize provider naming in the UI and codebase so OpenAI API, Anthropic API, and Azure OpenAI use consistent API-facing terminology, while ChatGPT and Claude remain the web product names.
Update related locale strings, config keys, and migration handling to preserve existing settings and avoid duplicate API markers in custom deployment labels.
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 Url→Custom Anthropic API UrlAnthropic API Keywith translations in all 13 localesInternal Code:
generateAnswersWithChatgptApi→generateAnswersWithOpenAiApigenerateAnswersWithChatgptApiCompat→generateAnswersWithOpenAiApiCompatConfig Keys:
claudeApiKey→anthropicApiKeycustomClaudeApiUrl→customAnthropicApiUrlUnchanged:
ChatGPT (Web),Claude.ai (Web)) - these refer to web productsRationale
"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
generateAnswersWithChatgptApi→generateAnswersWithOpenAiApigenerateAnswersWithChatgptApiCompat→generateAnswersWithOpenAiApiCompatAdd missing
Anthropic API Keylocale string across all language filesUpdate locale strings to use
Anthropicinstead ofClaudefor API-related settingsDiagram Walkthrough
File Walkthrough
13 files
Update German locale strings for Anthropic APIUpdate English locale strings for Anthropic APIUpdate Spanish locale strings for Anthropic APIUpdate French locale strings for Anthropic APIUpdate Indonesian locale strings for Anthropic APIUpdate Italian locale strings for Anthropic APIUpdate Japanese locale strings for Anthropic APIUpdate Korean locale strings for Anthropic APIUpdate Portuguese locale strings for Anthropic APIUpdate Russian locale strings for Anthropic APIUpdate Turkish locale strings for Anthropic APIUpdate Simplified Chinese locale strings for Anthropic APIUpdate Traditional Chinese locale strings for Anthropic API11 files
Rename ChatGPT API function to OpenAI APIUpdate model group and model display names for API providersUpdate Custom Anthropic API URL label in UIUpdate Anthropic API Key placeholder textRename OpenAI API compat function callRename OpenAI API compat function callRename OpenAI API compat function callRename OpenAI API compat function callRename OpenAI API compat function callRename ChatGPT API functions to OpenAI APIRename OpenAI API compat function call1 files
Update test names for OpenAI API compat functionSummary by CodeRabbit
New Features
Chores