Part of epic #155.
Goal: Add native Anthropic (AWS-billable, non-Bedrock direct billing) as an additive provider so standalone runs can use it immediately. This is the unblocker for the word-blurb 1000-image run. It does not flip any shipped default (that is Phase 3) — purely additive and low-risk.
Scope
- New provider branch in the LLM factory (
src/utils/openrouter_llm.py, or a small create_llm dispatcher) for native Anthropic: prefix anthropic/<model>, key ANTHROPIC_API_KEY, optional api_base from ANTHROPIC_BASE_URL, optional workspace header from ANTHROPIC_WORKSPACE_ID (exact header name confirmed via smoke test).
- Wire
--provider anthropic (CLI) and LLM_PROVIDER=anthropic selection into the standalone path (src/cli/local_executor.py:174-223, 278-290) for annotation + eval + keyword + vision LLMs.
- Preserve annotation prompt caching on the Anthropic path; fix
is_cacheable_model() to return True for bare claude- ids (minimal; full universal caching is Phase 2).
- Credentials: read
ANTHROPIC_* from env; minimal per-provider storage or env-only for this phase.
- Model overridable to
claude-opus-4-8.
Definition of Done
hedit annotate "<text>" --provider anthropic --model claude-opus-4-8 returns a valid HED annotation billed to AWS.
- One key-gated integration smoke test (skips when
ANTHROPIC_API_KEY absent; no mocks per repo policy).
- OpenRouter and Ollama paths unchanged; shipped defaults unchanged.
Prereqs
ANTHROPIC_API_KEY for the AWS-external account exported (ANTHROPIC_BASE_URL + ANTHROPIC_WORKSPACE_ID already known).
Part of epic #155.
Goal: Add native Anthropic (AWS-billable, non-Bedrock direct billing) as an additive provider so standalone runs can use it immediately. This is the unblocker for the word-blurb 1000-image run. It does not flip any shipped default (that is Phase 3) — purely additive and low-risk.
Scope
src/utils/openrouter_llm.py, or a smallcreate_llmdispatcher) for native Anthropic: prefixanthropic/<model>, keyANTHROPIC_API_KEY, optionalapi_basefromANTHROPIC_BASE_URL, optional workspace header fromANTHROPIC_WORKSPACE_ID(exact header name confirmed via smoke test).--provider anthropic(CLI) andLLM_PROVIDER=anthropicselection into the standalone path (src/cli/local_executor.py:174-223, 278-290) for annotation + eval + keyword + vision LLMs.is_cacheable_model()to return True for bareclaude-ids (minimal; full universal caching is Phase 2).ANTHROPIC_*from env; minimal per-provider storage or env-only for this phase.claude-opus-4-8.Definition of Done
hedit annotate "<text>" --provider anthropic --model claude-opus-4-8returns a valid HED annotation billed to AWS.ANTHROPIC_API_KEYabsent; no mocks per repo policy).Prereqs
ANTHROPIC_API_KEYfor the AWS-external account exported (ANTHROPIC_BASE_URL+ANTHROPIC_WORKSPACE_IDalready known).