mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-16 13:03:31 +08:00
Provider presets now carry an explicit auth strategy so Anthropic-compatible services can choose the right Claude Code environment shape instead of relying on one global variable. The desktop editor exposes the same strategy, keeps settings.json previews in sync, and applies the strategy to connection tests as well as runtime env sync. Constraint: Third-party Anthropic-compatible providers do not agree on ANTHROPIC_API_KEY versus ANTHROPIC_AUTH_TOKEN. Rejected: Force all third-party providers onto one env var | breaks providers that require bearer auth, dual variables, or dummy local auth. Confidence: high Scope-risk: moderate Directive: Add new provider presets with explicit authStrategy; do not infer auth behavior from model names alone. Tested: bun test src/server/__tests__/providers.test.ts src/server/__tests__/providers-real.test.ts src/server/__tests__/provider-presets.test.ts src/server/__tests__/conversation-service.test.ts Tested: cd desktop && bun run lint Tested: ALLOW_CLI_CORE_CHANGE=1 bun run quality:pr Tested: bun run quality:gate --mode baseline --allow-live --provider-model minimax:main:minimax-main Tested: agent-browser provider edit flow on http://127.0.0.1:19811 Not-tested: Live successful calls for every third-party provider with real credentials.