迁移路径: /run/media/airlongdian/EasyU/AirCoding -> /home/airlongdian/DataDevices/AirWorkSpace/AirCoding Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
901 B
Executable File
901 B
Executable File
ADR-0008: Use Anthropic Canonical Messages With Provider Adapters
- Status: Accepted
- Date: 2026-05-27
Context
AirCoding needs provider flexibility while preserving a stable internal representation for prompts, tools, messages, context compaction, and session persistence.
Decision
Use Anthropic canonical content blocks internally. ContextAssembler emits Anthropic canonical messages. Provider adapters convert at the LLM boundary to Anthropic, OpenAI, OpenRouter, ollama, or compatible endpoints.
Provider capability matrix controls whether a model can satisfy the task and whether conversion is lossless, lossy, or unsupported.
Consequences
- Same-provider model switching has low conversion cost.
- Cross-provider differences are localized to adapters.
- Unsupported required features block before model call.
- Tool/result/message persistence remains stable across providers.