mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-27 08:14:33 +08:00
refactor(proxy): disable OpenRouter compat mode by default and hide UI toggle
OpenRouter now natively supports Claude Code compatible API (/v1/messages), so format transformation (Anthropic ↔ OpenAI) is no longer needed by default. - Change default value from `true` to `false` in both frontend and backend - Hide the "OpenRouter Compatibility Mode" toggle in provider form - Users can still enable it manually by adding `"openrouter_compat_mode": true` in config JSON - Update unit tests to reflect new default behavior
This commit is contained in:
@@ -236,7 +236,7 @@ export function ProviderForm({
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
return true;
|
||||
return false; // OpenRouter now supports Claude Code compatible API, no need for transform
|
||||
}, [isOpenRouterProvider, settingsConfigValue]);
|
||||
|
||||
const handleOpenRouterCompatChange = useCallback(
|
||||
@@ -864,7 +864,7 @@ export function ProviderForm({
|
||||
defaultOpusModel={defaultOpusModel}
|
||||
onModelChange={handleModelChange}
|
||||
speedTestEndpoints={speedTestEndpoints}
|
||||
showOpenRouterCompatToggle={isOpenRouterProvider}
|
||||
showOpenRouterCompatToggle={false}
|
||||
openRouterCompatEnabled={openRouterCompatEnabled}
|
||||
onOpenRouterCompatChange={handleOpenRouterCompatChange}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user