Files
CodePilot/docs/exec-plans
7418andClaude Opus 4.6 f76e4747cd feat: unified provider resolver with protocol-based dispatch
Extract provider resolution logic into two new modules:
- provider-catalog.ts: vendor presets, default model catalogs, protocol definitions
- provider-resolver.ts: unified resolution for all consumers (Claude SDK, AI SDK, model listing)

DB migration:
- Add protocol, headers_json, env_overrides_json, role_models_json columns to api_providers
- Create provider_models table for per-provider model catalog

Consumer refactoring:
- claude-client.ts: replace inline env-building with toClaudeCodeEnv()
- text-generator.ts: replace inline config with toAiSdkConfig()
- conversation-engine.ts, onboarding, checkin, plan routes: use shared resolveProvider()
- /api/providers/models: read from catalog + provider_models table

UI improvements:
- Merge confusing "Custom API (Anthropic-compatible)" into "Anthropic Third-party API"
- Add 3-field model name mapping (sonnet/opus/haiku) in advanced options
- ProviderForm.tsx: support new fields (protocol, env_overrides, role_models)

Bug fixes:
- Protect auth credentials from being deleted by legacy extra_env empty-string overrides
- Fix env var names: ANTHROPIC_DEFAULT_SONNET → ANTHROPIC_DEFAULT_SONNET_MODEL (SDK convention)

Tests: 229/229 passed. Verified with aiberm (no mapping) and pipellm (with mapping).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 20:30:35 +08:00
..

Exec Plans / 执行计划

中大型功能的执行计划,包含分阶段目标、进度状态和决策日志。

AI 须知:

  • 新建执行计划放在 active/,完成后移至 completed/
  • 纯调研/可行性分析仍放 docs/research/
  • 修改或新增文件后更新下方索引
  • 检索本目录前先读此文件

什么时候需要执行计划

  • 涉及数据库 schema 变更
  • 跨 3 个以上模块的功能
  • 需要分阶段交付的中大型功能
  • 重构或迁移类任务

执行计划模板

# {功能名称}

> 创建时间:YYYY-MM-DD
> 最后更新:YYYY-MM-DD

## 状态

| Phase | 内容 | 状态 | 备注 |
|-------|------|------|------|
| Phase 0 | ... | 📋 待开始 / 🔄 进行中 / ✅ 已完成 / ⏸ 暂缓 | |

## 决策日志

- YYYY-MM-DD: 决策内容及原因

## 详细设计

(目标、技术方案、拆分步骤、依赖项、验收标准)

索引

Active

文件 主题 状态
active/context-storage-migration.md 上下文共享与存储迁移 Phase 0 部分完成,Phase 1-3 待开始

Completed

文件 主题 完成日期
completed/engineering-quality-assurance.md 工程质量保障体系(Harness Engineering)— 验证闭环、AI 文档、CDP、执行计划 2026-03-04