Skip to content

Phase 1: Additive anthropic provider (unblocker) #156

Description

@neuromechanist

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: cliRelated to command-line interfacepriority: highHigh priority - important for upcoming releasetype: featureNew feature or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions