feat: add auth policy disclaimer and repo maintenance notice

Add prominent warnings about Anthropic's Agent SDK policy regarding
subscription-based authentication for third-party agents. Users are
now advised to use API keys instead of `claude login` to avoid
potential account suspension.

Changes:
- README: Add WARNING and NOTE admonition boxes at top (auth policy
  + repo no longer actively maintained)
- README: Flip auth recommendation to API key first, subscription second
- SettingsModal: Add amber warning Alert when Claude provider is selected
- auth.py: Update CLI/server help messages to recommend API key as Option 1
- Start scripts (start.sh, start.bat, start_ui.sh): Mention ANTHROPIC_API_KEY
  alongside claude login in all auth hints
- start.py, autonomous_agent_demo.py: Update help text references

No functionality removed — subscription auth still works, warnings are
informational only.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Auto
2026-03-26 11:45:45 +02:00
parent bcb771734e
commit e0cd0b721e
8 changed files with 50 additions and 23 deletions

View File

@@ -1,5 +1,5 @@
import { useState } from 'react'
import { Loader2, AlertCircle, Check, Moon, Sun, Eye, EyeOff, ShieldCheck } from 'lucide-react'
import { Loader2, AlertCircle, AlertTriangle, Check, Moon, Sun, Eye, EyeOff, ShieldCheck } from 'lucide-react'
import { useSettings, useUpdateSettings, useAvailableModels, useAvailableProviders } from '../hooks/useProjects'
import { useTheme, THEMES } from '../hooks/useTheme'
import type { ProviderInfo } from '../lib/types'
@@ -21,7 +21,7 @@ interface SettingsModalProps {
}
const PROVIDER_INFO_TEXT: Record<string, string> = {
claude: 'Default provider. Uses your Claude CLI credentials.',
claude: 'Default provider. Uses Claude CLI credentials. API key auth is recommended.',
kimi: 'Get an API key at kimi.com',
glm: 'Get an API key at open.bigmodel.cn',
ollama: 'Run models locally. Install from ollama.com',
@@ -245,6 +245,15 @@ export function SettingsModal({ isOpen, onClose }: SettingsModalProps) {
{PROVIDER_INFO_TEXT[currentProvider] ?? ''}
</p>
{currentProvider === 'claude' && (
<Alert className="border-amber-500/50 bg-amber-50 dark:bg-amber-950/20 mt-2">
<AlertTriangle className="h-4 w-4 text-amber-600" />
<AlertDescription className="text-xs text-amber-700 dark:text-amber-300">
Anthropic's policy may not permit using subscription-based auth (<code className="text-xs">claude login</code>) with third-party agents. Consider using an API key provider or setting the <code className="text-xs">ANTHROPIC_API_KEY</code> environment variable to avoid potential account issues.
</AlertDescription>
</Alert>
)}
{/* Auth Token Field */}
{showAuthField && (
<div className="space-y-2 pt-1">